reorder passes
authorChris Lattner <sabre@nondot.org>
Sun, 15 Jan 2006 07:19:53 +0000 (07:19 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 15 Jan 2006 07:19:53 +0000 (07:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25326 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Sparc/SparcTargetMachine.cpp
lib/Target/SparcV8/SparcV8TargetMachine.cpp

index fbe353fc05132479dc05641023b5aeaaec38557d..08e38fc7a36c75bfe6b3bd86d77d9f520fb94916 100644 (file)
@@ -73,9 +73,6 @@ bool SparcV8TargetMachine::addPassesToEmitFile(PassManager &PM,
   // FIXME: Implement efficient support for garbage collection intrinsics.
   PM.add(createLowerGCPass());
 
-  // Make sure that no unreachable blocks are instruction selected.
-  PM.add(createUnreachableBlockEliminationPass());
-
   // FIXME: implement the invoke/unwind instructions!
   PM.add(createLowerInvokePass());
 
@@ -90,9 +87,14 @@ bool SparcV8TargetMachine::addPassesToEmitFile(PassManager &PM,
     // Replace malloc and free instructions with library calls.
     PM.add(createLowerAllocationsPass());
     PM.add(createLowerSelectPass());
+    // Make sure that no unreachable blocks are instruction selected.
+    PM.add(createUnreachableBlockEliminationPass());
     PM.add(createSparcV8SimpleInstructionSelector(*this));
-  } else
+  } else {
+    // Make sure that no unreachable blocks are instruction selected.
+    PM.add(createUnreachableBlockEliminationPass());
     PM.add(createSparcV8ISelDag(*this));
+  }
 
   // Print machine instructions as they were initially generated.
   if (PrintMachineCode)
index fbe353fc05132479dc05641023b5aeaaec38557d..08e38fc7a36c75bfe6b3bd86d77d9f520fb94916 100644 (file)
@@ -73,9 +73,6 @@ bool SparcV8TargetMachine::addPassesToEmitFile(PassManager &PM,
   // FIXME: Implement efficient support for garbage collection intrinsics.
   PM.add(createLowerGCPass());
 
-  // Make sure that no unreachable blocks are instruction selected.
-  PM.add(createUnreachableBlockEliminationPass());
-
   // FIXME: implement the invoke/unwind instructions!
   PM.add(createLowerInvokePass());
 
@@ -90,9 +87,14 @@ bool SparcV8TargetMachine::addPassesToEmitFile(PassManager &PM,
     // Replace malloc and free instructions with library calls.
     PM.add(createLowerAllocationsPass());
     PM.add(createLowerSelectPass());
+    // Make sure that no unreachable blocks are instruction selected.
+    PM.add(createUnreachableBlockEliminationPass());
     PM.add(createSparcV8SimpleInstructionSelector(*this));
-  } else
+  } else {
+    // Make sure that no unreachable blocks are instruction selected.
+    PM.add(createUnreachableBlockEliminationPass());
     PM.add(createSparcV8ISelDag(*this));
+  }
 
   // Print machine instructions as they were initially generated.
   if (PrintMachineCode)