From 9eaf49b320e7725fbf4e24721d91a69a6d36938f Mon Sep 17 00:00:00 2001 From: Cameron Zwarich Date: Sun, 5 Dec 2010 22:34:08 +0000 Subject: Some cleanup before I start committing some incremental progress on StrongPHIElimination. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120961 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/StrongPHIElimination.cpp | 43 ++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 21 deletions(-) (limited to 'lib/CodeGen/StrongPHIElimination.cpp') diff --git a/lib/CodeGen/StrongPHIElimination.cpp b/lib/CodeGen/StrongPHIElimination.cpp index 0ecea6d6bc..c62b1cd360 100644 --- a/lib/CodeGen/StrongPHIElimination.cpp +++ b/lib/CodeGen/StrongPHIElimination.cpp @@ -19,28 +19,16 @@ using namespace llvm; namespace { -class StrongPHIElimination : public MachineFunctionPass { -public: - static char ID; // Pass identification, replacement for typeid - StrongPHIElimination() : MachineFunctionPass(ID) { - initializeStrongPHIEliminationPass(*PassRegistry::getPassRegistry()); - } + class StrongPHIElimination : public MachineFunctionPass { + public: + static char ID; // Pass identification, replacement for typeid + StrongPHIElimination() : MachineFunctionPass(ID) { + initializeStrongPHIEliminationPass(*PassRegistry::getPassRegistry()); + } -private: - bool runOnMachineFunction(MachineFunction &Fn) { - llvm_unreachable("Strong phi elimination is not implemented"); - } - - virtual void getAnalysisUsage(AnalysisUsage &AU) const { - AU.setPreservesCFG(); - AU.addRequired(); - AU.addRequired(); - AU.addPreserved(); - AU.addRequired(); - AU.addPreserved(); - MachineFunctionPass::getAnalysisUsage(AU); - } -}; + virtual void getAnalysisUsage(AnalysisUsage&) const; + bool runOnMachineFunction(MachineFunction&); + }; } // namespace char StrongPHIElimination::ID = 0; @@ -54,3 +42,16 @@ INITIALIZE_PASS_END(StrongPHIElimination, "strong-phi-node-elimination", char &llvm::StrongPHIEliminationID = StrongPHIElimination::ID; +void StrongPHIElimination::getAnalysisUsage(AnalysisUsage& AU) const { + AU.setPreservesCFG(); + AU.addRequired(); + AU.addRequired(); + AU.addPreserved(); + AU.addRequired(); + AU.addPreserved(); + MachineFunctionPass::getAnalysisUsage(AU); +} + +bool StrongPHIElimination::runOnMachineFunction(MachineFunction& Fn) { + llvm_unreachable("Strong phi elimination is not implemented"); +} -- cgit v1.2.3-18-g5258