diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-02-17 06:41:03 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-02-17 06:41:03 +0000 |
commit | bf18939180afcd8d0c8c422f86b170e036544be6 (patch) | |
tree | e226de7f9c4196da39511cd08b5084e3d7148799 /lib/CodeGen/VirtRegMap.cpp | |
parent | a66878b881851f6de2c3b21f969ed8e13b844601 (diff) |
A couple of places where reused use operands should be marked kill. This is exposed by recent availability fallthrough changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64745 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/VirtRegMap.cpp')
-rw-r--r-- | lib/CodeGen/VirtRegMap.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/CodeGen/VirtRegMap.cpp b/lib/CodeGen/VirtRegMap.cpp index f288dcc87c..e2dc636e69 100644 --- a/lib/CodeGen/VirtRegMap.cpp +++ b/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; |