Move the post-lsr simplify cfg pass after lowereh, so it can clean up after
authorChris Lattner <sabre@nondot.org>
Tue, 27 Sep 2005 00:14:41 +0000 (00:14 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 27 Sep 2005 00:14:41 +0000 (00:14 +0000)
eh lowering as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23459 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPCTargetMachine.cpp

index 1acd01de31b9f31cbf68a716f319c8b59fb7df5d..487f1443071474bd9787fef586514991dfc6ffa6 100644 (file)
@@ -71,13 +71,15 @@ bool PowerPCTargetMachine::addPassesToEmitFile(PassManager &PM,
 
   // Run loop strength reduction before anything else.
   PM.add(createLoopStrengthReducePass());
-  PM.add(createCFGSimplificationPass());
 
   // FIXME: Implement efficient support for garbage collection intrinsics.
   PM.add(createLowerGCPass());
 
   // FIXME: Implement the invoke/unwind instructions!
   PM.add(createLowerInvokePass());
+  
+  // Clean up after other passes, e.g. merging critical edges.
+  PM.add(createCFGSimplificationPass());
 
   // FIXME: Implement the switch instruction in the instruction selector!
   PM.add(createLowerSwitchPass());
@@ -126,7 +128,6 @@ void PowerPCJITInfo::addPassesToJITCompile(FunctionPassManager &PM) {
 
   // Run loop strength reduction before anything else.
   PM.add(createLoopStrengthReducePass());
-  PM.add(createCFGSimplificationPass());
 
   // FIXME: Implement efficient support for garbage collection intrinsics.
   PM.add(createLowerGCPass());
@@ -134,6 +135,9 @@ void PowerPCJITInfo::addPassesToJITCompile(FunctionPassManager &PM) {
   // FIXME: Implement the invoke/unwind instructions!
   PM.add(createLowerInvokePass());
 
+  // Clean up after other passes, e.g. merging critical edges.
+  PM.add(createCFGSimplificationPass());
+
   // FIXME: Implement the switch instruction in the instruction selector!
   PM.add(createLowerSwitchPass());