From 5b5caaf3cd32e56f0005135995794c78951f4fec Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 2 Mar 2005 21:56:00 +0000 Subject: [PATCH] cleanup the cfg after lsr llvm-svn: 20410 --- llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp index 4bc5c50211e4..dd40e1333c7b 100644 --- a/llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp +++ b/llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp @@ -75,8 +75,10 @@ bool PowerPCTargetMachine::addPassesToEmitAssembly(PassManager &PM, std::ostream &Out) { bool LP64 = (0 != dynamic_cast(this)); - if (EnablePPCLSR) + if (EnablePPCLSR) { PM.add(createLoopStrengthReducePass()); + PM.add(createCFGSimplificationPass()); + } // FIXME: Implement efficient support for garbage collection intrinsics. PM.add(createLowerGCPass()); @@ -120,8 +122,10 @@ bool PowerPCTargetMachine::addPassesToEmitAssembly(PassManager &PM, } void PowerPCJITInfo::addPassesToJITCompile(FunctionPassManager &PM) { - if (EnablePPCLSR) + if (EnablePPCLSR) { PM.add(createLoopStrengthReducePass()); + PM.add(createCFGSimplificationPass()); + } // FIXME: Implement efficient support for garbage collection intrinsics. PM.add(createLowerGCPass());