aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCTargetMachine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/PowerPC/PPCTargetMachine.cpp')
-rw-r--r--lib/Target/PowerPC/PPCTargetMachine.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp
index 1acd01de31..487f144307 100644
--- a/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -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());