summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2013-06-21 18:33:20 +0000
committerAndrew Trick <atrick@apple.com>2013-06-21 18:33:20 +0000
commit6b9c49a275df11379836138b05cea53a3802ea61 (patch)
treeae338b99824abedfad338f7b6902846eb71c543d /llvm/lib
parent530fc1f486d713e34562ddb65784c344827af977 (diff)
downloadbcm5719-llvm-6b9c49a275df11379836138b05cea53a3802ea61.tar.gz
bcm5719-llvm-6b9c49a275df11379836138b05cea53a3802ea61.zip
Handle more cases in LiveRangeEdit::eliminateDeadDefs.
Live intervals for dead physregs may be created during coalescing. We need to update these in the event that their instruction goes away. crash.ll is the unit test that catches it when MI sched is enabled on X86. llvm-svn: 184572
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/LiveRangeEdit.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LiveRangeEdit.cpp b/llvm/lib/CodeGen/LiveRangeEdit.cpp
index 0c1d45902fe..d215d0c28a4 100644
--- a/llvm/lib/CodeGen/LiveRangeEdit.cpp
+++ b/llvm/lib/CodeGen/LiveRangeEdit.cpp
@@ -249,6 +249,15 @@ void LiveRangeEdit::eliminateDeadDef(MachineInstr *MI, ToShrinkSet &ToShrink) {
// Check if MI reads any unreserved physregs.
if (Reg && MOI->readsReg() && !MRI.isReserved(Reg))
ReadsPhysRegs = true;
+ else if (MOI->isDef()) {
+ for (MCRegUnitIterator Units(Reg, MRI.getTargetRegisterInfo());
+ Units.isValid(); ++Units) {
+ if (LiveInterval *LI = LIS.getCachedRegUnit(*Units)) {
+ if (VNInfo *VNI = LI->getVNInfoAt(Idx))
+ LI->removeValNo(VNI);
+ }
+ }
+ }
continue;
}
LiveInterval &LI = LIS.getInterval(Reg);
OpenPOWER on IntegriCloud