[llvm-commits] CVS: llvm/lib/CodeGen/PHIElimination.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon May 12 12:38:01 PDT 2003


Changes in directory llvm/lib/CodeGen:

PHIElimination.cpp updated: 1.7 -> 1.8

---
Log message:

Use a kill, not a dead definition, update comment


---
Diffs of the changes:

Index: llvm/lib/CodeGen/PHIElimination.cpp
diff -u llvm/lib/CodeGen/PHIElimination.cpp:1.7 llvm/lib/CodeGen/PHIElimination.cpp:1.8
--- llvm/lib/CodeGen/PHIElimination.cpp:1.7	Mon May 12 09:28:28 2003
+++ llvm/lib/CodeGen/PHIElimination.cpp	Mon May 12 12:37:30 2003
@@ -87,12 +87,11 @@
       MachineInstr *PHICopy = *(AfterPHIsIt-1);
 
       // Add information to LiveVariables to know that the incoming value is
-      // dead.  This says that the register is dead, not killed, because we
-      // cannot use the live variable information to indicate that the variable
-      // is defined in multiple entry blocks.  Instead, we pretend that this
-      // instruction defined it and killed it at the same time.
+      // killed.  Note that because the value is defined in several places (once
+      // each for each incoming block), the "def" block and instruction fields
+      // for the VarInfo is not filled in.
       //
-      LV->addVirtualRegisterDead(IncomingReg, &MBB, PHICopy);
+      LV->addVirtualRegisterKilled(IncomingReg, &MBB, PHICopy);
 
       // Since we are going to be deleting the PHI node, if it is the last use
       // of any registers, or if the value itself is dead, we need to move this





More information about the llvm-commits mailing list