[llvm] r223882 - LiveRangeEdit: Adapt eliminateDeadDef() to subregister liveness.
Matthias Braun
matze at braunis.de
Tue Dec 9 17:12:23 PST 2014
Author: matze
Date: Tue Dec 9 19:12:23 2014
New Revision: 223882
URL: http://llvm.org/viewvc/llvm-project?rev=223882&view=rev
Log:
LiveRangeEdit: Adapt eliminateDeadDef() to subregister liveness.
Modified:
llvm/trunk/lib/CodeGen/LiveRangeEdit.cpp
Modified: llvm/trunk/lib/CodeGen/LiveRangeEdit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveRangeEdit.cpp?rev=223882&r1=223881&r2=223882&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveRangeEdit.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveRangeEdit.cpp Tue Dec 9 19:12:23 2014
@@ -286,8 +286,16 @@ void LiveRangeEdit::eliminateDeadDef(Mac
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);
+ }
+ }
}
}
}
More information about the llvm-commits
mailing list