]> granicus.if.org Git - llvm/commitdiff
Use a kill, not a dead definition, update comment
authorChris Lattner <sabre@nondot.org>
Mon, 12 May 2003 17:37:30 +0000 (17:37 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 12 May 2003 17:37:30 +0000 (17:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6131 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/PHIElimination.cpp

index 4a23eb257d5579c799e093fa0b295572c29260bc..11835cb30c54ba10b8310a5084643b1c18e4030a 100644 (file)
@@ -87,12 +87,11 @@ bool PNE::EliminatePHINodes(MachineFunction &MF, MachineBasicBlock &MBB) {
       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