diff options
author | Lang Hames <lhames@gmail.com> | 2009-07-23 05:44:24 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2009-07-23 05:44:24 +0000 |
commit | 077415e84b60220421264ecfc11942e97218e688 (patch) | |
tree | 66378de7592acea28df1adadf554b231bac51cd7 /llvm/lib/CodeGen/PHIElimination.cpp | |
parent | 7152d39d6d18252cf00801a94a87c245971861b6 (diff) | |
download | bcm5719-llvm-077415e84b60220421264ecfc11942e97218e688.tar.gz bcm5719-llvm-077415e84b60220421264ecfc11942e97218e688.zip |
For real this time: PHI Def & Kill tracking added to PHIElimination.
llvm-svn: 76865
Diffstat (limited to 'llvm/lib/CodeGen/PHIElimination.cpp')
-rw-r--r-- | llvm/lib/CodeGen/PHIElimination.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/PHIElimination.cpp b/llvm/lib/CodeGen/PHIElimination.cpp index 1cbe7989452..56dca086ef2 100644 --- a/llvm/lib/CodeGen/PHIElimination.cpp +++ b/llvm/lib/CodeGen/PHIElimination.cpp @@ -50,6 +50,8 @@ void llvm::PHIElimination::getAnalysisUsage(AnalysisUsage &AU) const { bool llvm::PHIElimination::runOnMachineFunction(MachineFunction &Fn) { MRI = &Fn.getRegInfo(); + PHIDefs.clear(); + PHIKills.clear(); analyzePHINodes(Fn); bool Changed = false; @@ -183,8 +185,8 @@ void llvm::PHIElimination::LowerAtomicPHINode( } // Record PHI def. - //assert(!hasPHIDef(DestReg) && "Vreg has multiple phi-defs?"); - //PHIDefs[DestReg] = &MBB; + assert(!hasPHIDef(DestReg) && "Vreg has multiple phi-defs?"); + PHIDefs[DestReg] = &MBB; // Update live variable information if there is any. LiveVariables *LV = getAnalysisIfAvailable<LiveVariables>(); @@ -232,7 +234,7 @@ void llvm::PHIElimination::LowerAtomicPHINode( MachineBasicBlock &opBlock = *MPhi->getOperand(i*2+2).getMBB(); // Record the kill. - //PHIKills[SrcReg].insert(&opBlock); + PHIKills[SrcReg].insert(&opBlock); // If source is defined by an implicit def, there is no need to insert a // copy. |