diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-02-23 21:47:50 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-02-23 21:47:50 +0000 |
commit | 50d25d7ff7326adef7c76ba79be3dd1d7240a81f (patch) | |
tree | c394f421bbe91fd68686f6b4713bfabce625efff | |
parent | 1da20a71d1bbabc472f281208be77475550be751 (diff) |
Reuse extends the liveness of a register. Transfer the kill to the operand that reuse it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34536 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/VirtRegMap.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/CodeGen/VirtRegMap.cpp b/lib/CodeGen/VirtRegMap.cpp index c1d6ee7ff0..4f1230cd20 100644 --- a/lib/CodeGen/VirtRegMap.cpp +++ b/lib/CodeGen/VirtRegMap.cpp @@ -665,8 +665,13 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, VirtRegMap &VRM) { // Extend the live range of the MI that last kill the register if // necessary. MachineOperand *MOK = SSMI->findRegisterUseOperand(PhysReg, true); - if (MOK) + if (MOK) { MOK->unsetIsKill(); + if (ti == -1) + // Unless it's the use of a two-address code, transfer the kill + // of the reused register to this use. + MI.getOperand(i).setIsKill(); + } // The only technical detail we have is that we don't know that // PhysReg won't be clobbered by a reloaded stack slot that occurs |