summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-07-26 00:54:56 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-07-26 00:54:56 +0000
commit5387bd340ba6ade97d67baafe1652b6f98cfbcf2 (patch)
treed6333f1d1329e29f15e90946c45b29977930cf32 /llvm/lib/CodeGen
parent06b9d065a2ed32be7cdd9e3b07a241c04d6995be (diff)
downloadbcm5719-llvm-5387bd340ba6ade97d67baafe1652b6f98cfbcf2.tar.gz
bcm5719-llvm-5387bd340ba6ade97d67baafe1652b6f98cfbcf2.zip
Revert to RA_Assign when a virtreg separates into components.
When dead code elimination deletes a PHI value, the virtual register may split into multiple connected components. In that case, revert each component to the RS_Assign stage. The new components are guaranteed to be smaller (the original value numbers are distributed among the components), so this will always be making progress. The components are now allowed to evict other live ranges or be split again. llvm-svn: 136034
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/RegAllocGreedy.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegAllocGreedy.cpp b/llvm/lib/CodeGen/RegAllocGreedy.cpp
index 147e8035340..d0b40dd113d 100644
--- a/llvm/lib/CodeGen/RegAllocGreedy.cpp
+++ b/llvm/lib/CodeGen/RegAllocGreedy.cpp
@@ -341,8 +341,10 @@ void RAGreedy::LRE_WillShrinkVirtReg(unsigned VirtReg) {
void RAGreedy::LRE_DidCloneVirtReg(unsigned New, unsigned Old) {
// LRE may clone a virtual register because dead code elimination causes it to
- // be split into connected components. Ensure that the new register gets the
+ // be split into connected components. The new components are much smaller
+ // than the original, so they should get a new chance at being assigned.
// same stage as the parent.
+ ExtraRegInfo[Old].Stage = RS_Assign;
ExtraRegInfo.grow(New);
ExtraRegInfo[New] = ExtraRegInfo[Old];
}
OpenPOWER on IntegriCloud