summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/VirtRegMap.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-02-17 06:41:03 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-02-17 06:41:03 +0000
commitf505cd5ebb825d5a8cc207566ebd9920a39055a9 (patch)
treecef5de5e19c4ddf057bd925852fbfa367e8e05fd /llvm/lib/CodeGen/VirtRegMap.cpp
parentb42700f555fd57bfe8082d54f87832b2cdbb3289 (diff)
downloadbcm5719-llvm-f505cd5ebb825d5a8cc207566ebd9920a39055a9.tar.gz
bcm5719-llvm-f505cd5ebb825d5a8cc207566ebd9920a39055a9.zip
A couple of places where reused use operands should be marked kill. This is exposed by recent availability fallthrough changes.
llvm-svn: 64745
Diffstat (limited to 'llvm/lib/CodeGen/VirtRegMap.cpp')
-rw-r--r--llvm/lib/CodeGen/VirtRegMap.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/VirtRegMap.cpp b/llvm/lib/CodeGen/VirtRegMap.cpp
index f288dcc87cf..e2dc636e691 100644
--- a/llvm/lib/CodeGen/VirtRegMap.cpp
+++ b/llvm/lib/CodeGen/VirtRegMap.cpp
@@ -1599,6 +1599,12 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, VirtRegMap &VRM,
PotentialDeadStoreSlots.push_back(ReuseSlot);
}
+
+ // Assumes this is the last use. IsKill will be unset if reg is reused
+ // unless it's a two-address operand.
+ if (ti == -1)
+ MI.getOperand(i).setIsKill();
+
continue;
} // CanReuse
@@ -1764,6 +1770,11 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, VirtRegMap &VRM,
DefMO = NextMII->findRegisterDefOperand(DestReg);
DefMO->setSubReg(SubIdx);
}
+
+ // Mark is killed.
+ MachineOperand *KillOpnd = NextMII->findRegisterUseOperand(InReg);
+ KillOpnd->setIsKill();
+
BackTracked = true;
} else {
DOUT << "Removing now-noop copy: " << MI;
OpenPOWER on IntegriCloud