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 | 0ef653ec28822038cc39aac52c7e6da4fb15900d (patch) | |
tree | 1c96cc0fc5111c549752589d66db734c3320e321 /lib/CodeGen/PHIElimination.cpp | |
parent | 546d35b6dabc6c0cce287d966f8d8d6fef613eca (diff) | |
download | external_llvm-0ef653ec28822038cc39aac52c7e6da4fb15900d.zip external_llvm-0ef653ec28822038cc39aac52c7e6da4fb15900d.tar.gz external_llvm-0ef653ec28822038cc39aac52c7e6da4fb15900d.tar.bz2 |
For real this time: PHI Def & Kill tracking added to PHIElimination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76865 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PHIElimination.cpp')
-rw-r--r-- | lib/CodeGen/PHIElimination.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/CodeGen/PHIElimination.cpp b/lib/CodeGen/PHIElimination.cpp index 1cbe798..56dca08 100644 --- a/lib/CodeGen/PHIElimination.cpp +++ b/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. |