summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/PHIElimination.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-05-12 17:37:30 +0000
committerChris Lattner <sabre@nondot.org>2003-05-12 17:37:30 +0000
commit1103e8349dc69f067a0489760888d93edd47bd8f (patch)
tree08437e77d4f9a51450da0cb1bd8d514402778a2e /llvm/lib/CodeGen/PHIElimination.cpp
parent778b947bfc7967ece4650ddcf94160d2f527c7f0 (diff)
downloadbcm5719-llvm-1103e8349dc69f067a0489760888d93edd47bd8f.tar.gz
bcm5719-llvm-1103e8349dc69f067a0489760888d93edd47bd8f.zip
Use a kill, not a dead definition, update comment
llvm-svn: 6131
Diffstat (limited to 'llvm/lib/CodeGen/PHIElimination.cpp')
-rw-r--r--llvm/lib/CodeGen/PHIElimination.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/PHIElimination.cpp b/llvm/lib/CodeGen/PHIElimination.cpp
index 4a23eb257d5..11835cb30c5 100644
--- a/llvm/lib/CodeGen/PHIElimination.cpp
+++ b/llvm/lib/CodeGen/PHIElimination.cpp
@@ -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
OpenPOWER on IntegriCloud