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:
Matthias Braun 2014-12-10 01:12:23 +00:00
parent dc08729288
commit c7db66d496

View File

@ -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);
}
}
}
}
}