mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136034 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
28c85a81a1
commit
165e231c42
@ -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];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user