mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-23 20:29:30 +00:00
LiveRangeEdit: Adapt eliminateDeadDef() to subregister liveness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223882 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
dc08729288
commit
c7db66d496
@ -286,8 +286,16 @@ void LiveRangeEdit::eliminateDeadDef(MachineInstr *MI, ToShrinkSet &ToShrink) {
|
||||
if (TheDelegate)
|
||||
TheDelegate->LRE_WillShrinkVirtReg(LI.reg);
|
||||
LI.removeValNo(VNI);
|
||||
if (LI.empty())
|
||||
if (LI.empty()) {
|
||||
RegsToErase.push_back(Reg);
|
||||
} else {
|
||||
// Also remove the value in subranges.
|
||||
for (LiveInterval::subrange_iterator S = LI.subrange_begin(),
|
||||
SE = LI.subrange_end(); S != SE; ++S) {
|
||||
if (VNInfo *SVNI = S->getVNInfoAt(Idx))
|
||||
S->removeValNo(SVNI);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user