Simplify the eviction policy by making the failsafe explicit.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 31 May 2011 21:02:44 +0000 (21:02 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 31 May 2011 21:02:44 +0000 (21:02 +0000)
commitd2056e51c662765f98413fa071afbff53d87b384
tree234b4abb5eecbaa1473aed81c2a3ecebbb058452
parent69388e5a4a941e7e02c7f4b52d6e743a480e135f
Simplify the eviction policy by making the failsafe explicit.

When assigned ranges are evicted, they are put in the RS_Evicted stage and are
not allowed to evict anything else. That prevents looping automatically.

When evicting ranges just to get a cheaper register, use only spill weights to
find the possible candidates. Avoid breaking hints for this purpose, it is not
worth it.

Start implementing more complex eviction heuristics, guarded by the temporary
-complex-eviction flag. The initial version permits a heavier range to be
evicted if it doesn't have any uses where the evicting range is live. This makes
it a good candidate for live ranfge splitting.

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