diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-02-23 00:28:53 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-02-23 00:28:53 +0000 |
commit | 012d4369f6d4e1128994570c8ed16c42170fc110 (patch) | |
tree | d513a36e918472727194363ac7223098df662a3c | |
parent | 46841e1bd9eed8386c71f157ba456477a5b79258 (diff) | |
download | bcm5719-llvm-012d4369f6d4e1128994570c8ed16c42170fc110.tar.gz bcm5719-llvm-012d4369f6d4e1128994570c8ed16c42170fc110.zip |
Dead code elimination
llvm-svn: 96837
-rw-r--r-- | llvm/lib/CodeGen/PHIElimination.cpp | 5 | ||||
-rw-r--r-- | llvm/lib/CodeGen/PHIElimination.h | 9 |
2 files changed, 0 insertions, 14 deletions
diff --git a/llvm/lib/CodeGen/PHIElimination.cpp b/llvm/lib/CodeGen/PHIElimination.cpp index bc49d0de223..9e4bc0c273f 100644 --- a/llvm/lib/CodeGen/PHIElimination.cpp +++ b/llvm/lib/CodeGen/PHIElimination.cpp @@ -55,7 +55,6 @@ void llvm::PHIElimination::getAnalysisUsage(AnalysisUsage &AU) const { bool llvm::PHIElimination::runOnMachineFunction(MachineFunction &Fn) { MRI = &Fn.getRegInfo(); - PHIDefs.clear(); bool Changed = false; // Split critical edges to help the coalescer @@ -214,10 +213,6 @@ void llvm::PHIElimination::LowerAtomicPHINode( TII->copyRegToReg(MBB, AfterPHIsIt, DestReg, IncomingReg, RC, RC); } - // Record PHI def. - assert(!hasPHIDef(DestReg) && "Vreg has multiple phi-defs?"); - PHIDefs[DestReg] = &MBB; - // Update live variable information if there is any. LiveVariables *LV = getAnalysisIfAvailable<LiveVariables>(); if (LV) { diff --git a/llvm/lib/CodeGen/PHIElimination.h b/llvm/lib/CodeGen/PHIElimination.h index 110721d01d6..ff4aa209185 100644 --- a/llvm/lib/CodeGen/PHIElimination.h +++ b/llvm/lib/CodeGen/PHIElimination.h @@ -22,10 +22,8 @@ namespace llvm { /// Lower PHI instructions to copies. class PHIElimination : public MachineFunctionPass { MachineRegisterInfo *MRI; // Machine register information - typedef DenseMap<unsigned, MachineBasicBlock*> PHIDefMap; public: - static char ID; // Pass identification, replacement for typeid PHIElimination() : MachineFunctionPass(&ID) {} @@ -33,12 +31,6 @@ namespace llvm { virtual void getAnalysisUsage(AnalysisUsage &AU) const; - /// Return true if the given vreg was defined by a PHI intsr prior to - /// lowering. - bool hasPHIDef(unsigned vreg) const { - return PHIDefs.count(vreg); - } - private: /// EliminatePHINodes - Eliminate phi nodes by inserting copy instructions /// in predecessor basic blocks. @@ -106,7 +98,6 @@ namespace llvm { typedef DenseMap<BBVRegPair, unsigned> VRegPHIUse; VRegPHIUse VRegPHIUseCount; - PHIDefMap PHIDefs; // Defs of PHI sources which are implicit_def. SmallPtrSet<MachineInstr*, 4> ImpDefs; |