mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-04-02 15:51:54 +00:00
LiveRangeEdit: Adapt eliminateDeadDef() to subregister liveness.
llvm-svn: 223882
This commit is contained in:
parent
e99321cb2c
commit
6a29b7d65d
@ -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