OK, this does wonders for broken stuff
[oota-llvm.git] / lib / Target / Alpha / AlphaTargetMachine.cpp
index 3ee13002a3945f80bec8f559fc54b91b1bd36acf..21a7f989810b8df1fcccb855d076391b261e1e9e 100644 (file)
@@ -79,7 +79,9 @@ bool AlphaTargetMachine::addPassesToEmitFile(PassManager &PM,
   if (FileType != TargetMachine::AssemblyFile) return true;
 
   PM.add(createLoopStrengthReducePass());
+  PM.add(createCFGSimplificationPass());
 
   // FIXME: Implement efficient support for garbage collection intrinsics.
   PM.add(createLowerGCPass());
 
@@ -92,8 +94,6 @@ bool AlphaTargetMachine::addPassesToEmitFile(PassManager &PM,
   // Make sure that no unreachable blocks are instruction selected.
   PM.add(createUnreachableBlockEliminationPass());
 
-  PM.add(createCFGSimplificationPass());
-
   if (EnableAlphaDAG)
     PM.add(createAlphaISelDag(*this));
   else
@@ -120,10 +120,8 @@ bool AlphaTargetMachine::addPassesToEmitFile(PassManager &PM,
 
 void AlphaJITInfo::addPassesToJITCompile(FunctionPassManager &PM) {
 
-  if (EnableAlphaLSR) {
-    PM.add(createLoopStrengthReducePass());
-    PM.add(createCFGSimplificationPass());
-  }
+  PM.add(createLoopStrengthReducePass());
+  PM.add(createCFGSimplificationPass());
 
   // FIXME: Implement efficient support for garbage collection intrinsics.
   PM.add(createLowerGCPass());