Enhanced heuristic to determine the *best* register to spill. Instead of picking...
authorEvan Cheng <evan.cheng@apple.com>
Fri, 20 Jun 2008 21:45:16 +0000 (21:45 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Fri, 20 Jun 2008 21:45:16 +0000 (21:45 +0000)
commit3e172254c136ce8170f17ad01f0706bd6e2e0505
treea2d35328b5561b8c4e684a754afbb69e921a7097
parent4eaac9b181d5a32e6c9135f7af00861b9fb88240
Enhanced heuristic to determine the *best* register to spill. Instead of picking the register with the lowest spill weight. Consider (up to) 2 additional registers with spill weights that are close to the lowest spill weight. The one with fewest defs and uses that conflicts with the current interval (weighted by loop depth) is the spill candidate.

This is not always a win, but there are much more wins than loses and wins tend to be more noticeable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52554 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/RegAllocLinearScan.cpp