aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/Sparc/SparcTargetMachine.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-07-02 05:49:11 +0000
committerChris Lattner <sabre@nondot.org>2004-07-02 05:49:11 +0000
commita9a582fbb6f0c9e24bebda73f0a13e560f2d3c5e (patch)
tree8757f7de5905e06056ca0e42f72dd95db08b462a /lib/Target/Sparc/SparcTargetMachine.cpp
parentfab96f0b69da768bf837c8042e522d93701ccccf (diff)
Fix potential problems with unreachable basic blocks.
Also, while noone's looking, add support for constant expressions. Wait, I said not to look! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14566 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Sparc/SparcTargetMachine.cpp')
-rw-r--r--lib/Target/Sparc/SparcTargetMachine.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Target/Sparc/SparcTargetMachine.cpp b/lib/Target/Sparc/SparcTargetMachine.cpp
index 344b88b817..ed133489be 100644
--- a/lib/Target/Sparc/SparcTargetMachine.cpp
+++ b/lib/Target/Sparc/SparcTargetMachine.cpp
@@ -56,6 +56,11 @@ bool SparcV8TargetMachine::addPassesToEmitAssembly(PassManager &PM,
// FIXME: implement the invoke/unwind instructions!
PM.add(createLowerInvokePass());
+ PM.add(createLowerConstantExpressionsPass());
+
+ // Make sure that no unreachable blocks are instruction selected.
+ PM.add(createUnreachableBlockEliminationPass());
+
PM.add(createSparcV8SimpleInstructionSelector(*this));
// Print machine instructions as they were initially generated.
@@ -102,7 +107,12 @@ void SparcV8JITInfo::addPassesToJITCompile(FunctionPassManager &PM) {
// FIXME: implement the invoke/unwind instructions!
PM.add(createLowerInvokePass());
+
+ PM.add(createLowerConstantExpressionsPass());
+ // Make sure that no unreachable blocks are instruction selected.
+ PM.add(createUnreachableBlockEliminationPass());
+
PM.add(createSparcV8SimpleInstructionSelector(TM));
// Print machine instructions as they were initially generated.