aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-12-20 08:00:11 +0000
committerChris Lattner <sabre@nondot.org>2005-12-20 08:00:11 +0000
commitaca0901dd3f02f83d13c2f818d0141d644d8e5b0 (patch)
treed4509336fed9790129df9b2ed3ba484874d3bf66 /lib
parent85e42b45ac05223882f24c17bff66b89daa0d6fc (diff)
Run lower-switch after lower-invoke.
Only run lower-allocations and lower-select for the simple isel git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24881 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/Sparc/SparcTargetMachine.cpp22
-rw-r--r--lib/Target/SparcV8/SparcV8TargetMachine.cpp22
2 files changed, 20 insertions, 24 deletions
diff --git a/lib/Target/Sparc/SparcTargetMachine.cpp b/lib/Target/Sparc/SparcTargetMachine.cpp
index 65e97aa678..e0766d1a2a 100644
--- a/lib/Target/Sparc/SparcTargetMachine.cpp
+++ b/lib/Target/Sparc/SparcTargetMachine.cpp
@@ -73,28 +73,25 @@ bool SparcV8TargetMachine::addPassesToEmitFile(PassManager &PM,
// FIXME: Implement efficient support for garbage collection intrinsics.
PM.add(createLowerGCPass());
- // Replace malloc and free instructions with library calls.
- PM.add(createLowerAllocationsPass());
-
- // FIXME: implement the switch instruction in the instruction selector.
- PM.add(createLowerSwitchPass());
+ // Make sure that no unreachable blocks are instruction selected.
+ PM.add(createUnreachableBlockEliminationPass());
// FIXME: implement the invoke/unwind instructions!
PM.add(createLowerInvokePass());
- // Make sure that no unreachable blocks are instruction selected.
- PM.add(createUnreachableBlockEliminationPass());
-
- // FIXME: implement the select instruction in the instruction selector.
- PM.add(createLowerSelectPass());
+ // FIXME: implement the switch instruction in the instruction selector.
+ PM.add(createLowerSwitchPass());
// Print LLVM code input to instruction selector:
if (PrintMachineCode)
PM.add(new PrintFunctionPass());
- if (DisableV8DAGDAG)
+ if (DisableV8DAGDAG) {
+ // Replace malloc and free instructions with library calls.
+ PM.add(createLowerAllocationsPass());
+ PM.add(createLowerSelectPass());
PM.add(createSparcV8SimpleInstructionSelector(*this));
- else
+ } else
PM.add(createSparcV8ISelDag(*this));
// Print machine instructions as they were initially generated.
@@ -110,6 +107,7 @@ bool SparcV8TargetMachine::addPassesToEmitFile(PassManager &PM,
PM.add(createMachineFunctionPrinterPass(&std::cerr));
PM.add(createSparcV8FPMoverPass(*this));
+
PM.add(createSparcV8DelaySlotFillerPass(*this));
// Print machine instructions after filling delay slots.
diff --git a/lib/Target/SparcV8/SparcV8TargetMachine.cpp b/lib/Target/SparcV8/SparcV8TargetMachine.cpp
index 65e97aa678..e0766d1a2a 100644
--- a/lib/Target/SparcV8/SparcV8TargetMachine.cpp
+++ b/lib/Target/SparcV8/SparcV8TargetMachine.cpp
@@ -73,28 +73,25 @@ bool SparcV8TargetMachine::addPassesToEmitFile(PassManager &PM,
// FIXME: Implement efficient support for garbage collection intrinsics.
PM.add(createLowerGCPass());
- // Replace malloc and free instructions with library calls.
- PM.add(createLowerAllocationsPass());
-
- // FIXME: implement the switch instruction in the instruction selector.
- PM.add(createLowerSwitchPass());
+ // Make sure that no unreachable blocks are instruction selected.
+ PM.add(createUnreachableBlockEliminationPass());
// FIXME: implement the invoke/unwind instructions!
PM.add(createLowerInvokePass());
- // Make sure that no unreachable blocks are instruction selected.
- PM.add(createUnreachableBlockEliminationPass());
-
- // FIXME: implement the select instruction in the instruction selector.
- PM.add(createLowerSelectPass());
+ // FIXME: implement the switch instruction in the instruction selector.
+ PM.add(createLowerSwitchPass());
// Print LLVM code input to instruction selector:
if (PrintMachineCode)
PM.add(new PrintFunctionPass());
- if (DisableV8DAGDAG)
+ if (DisableV8DAGDAG) {
+ // Replace malloc and free instructions with library calls.
+ PM.add(createLowerAllocationsPass());
+ PM.add(createLowerSelectPass());
PM.add(createSparcV8SimpleInstructionSelector(*this));
- else
+ } else
PM.add(createSparcV8ISelDag(*this));
// Print machine instructions as they were initially generated.
@@ -110,6 +107,7 @@ bool SparcV8TargetMachine::addPassesToEmitFile(PassManager &PM,
PM.add(createMachineFunctionPrinterPass(&std::cerr));
PM.add(createSparcV8FPMoverPass(*this));
+
PM.add(createSparcV8DelaySlotFillerPass(*this));
// Print machine instructions after filling delay slots.