Evict local live ranges if they can be reassigned.
authorAndrew Trick <atrick@apple.com>
Thu, 25 Jul 2013 18:35:19 +0000 (18:35 +0000)
committerAndrew Trick <atrick@apple.com>
Thu, 25 Jul 2013 18:35:19 +0000 (18:35 +0000)
commit8adae96fd905daa8835b6fde5e74e25d818c7471
tree020563bcb74479535c2e949ca6916e2c277f307f
parent6ea2b9608a38e9b53d208ff85051e8e3ed53192c
Evict local live ranges if they can be reassigned.

The previous change to local live range allocation also suppressed
eviction of local ranges. In rare cases, this could result in more
expensive register choices. This commit actually revives a feature
that I added long ago: check if live ranges can be reassigned before
eviction. But now it only happens in rare cases of evicting a local
live range because another local live range wants a cheaper register.

The benefit is improved code size for some benchmarks on x86 and armv7.

I measured no significant compile time increase and performance
changes are noise.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187140 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/RegAllocGreedy.cpp
test/CodeGen/ARM/avoid-cpsr-rmw.ll
test/CodeGen/X86/StackColoring.ll
test/CodeGen/X86/legalize-shift-64.ll
test/CodeGen/X86/misched-matmul.ll