Changes in directory llvm/lib/CodeGen:

VirtRegMap.cpp updated: 1.98 -> 1.99
---
Log message:

Reuse extends the liveness of a register. Transfer the kill to the operand that 
reuse it.

---
Diffs of the changes:  (+6 -1)

 VirtRegMap.cpp |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)


Index: llvm/lib/CodeGen/VirtRegMap.cpp
diff -u llvm/lib/CodeGen/VirtRegMap.cpp:1.98 
llvm/lib/CodeGen/VirtRegMap.cpp:1.99
--- llvm/lib/CodeGen/VirtRegMap.cpp:1.98        Thu Feb 22 19:13:26 2007
+++ llvm/lib/CodeGen/VirtRegMap.cpp     Fri Feb 23 15:47:50 2007
@@ -665,8 +665,13 @@
           // 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



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to