diff options
Diffstat (limited to 'llvm/lib/Target/PowerPC')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | 7 | ||||
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCTargetMachine.h | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp index 9a88750b398..c92122ec7d8 100644 --- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -77,11 +77,12 @@ PPCTargetMachine::PPCTargetMachine(const Module &M, IntrinsicLowering *IL, /// bool PPCTargetMachine::addPassesToEmitFile(PassManager &PM, std::ostream &Out, - CodeGenFileType FileType) { + CodeGenFileType FileType, + bool Fast) { if (FileType != TargetMachine::AssemblyFile) return true; // Run loop strength reduction before anything else. - PM.add(createLoopStrengthReducePass()); + if (!Fast) PM.add(createLoopStrengthReducePass()); // FIXME: Implement efficient support for garbage collection intrinsics. PM.add(createLowerGCPass()); @@ -90,7 +91,7 @@ bool PPCTargetMachine::addPassesToEmitFile(PassManager &PM, PM.add(createLowerInvokePass()); // Clean up after other passes, e.g. merging critical edges. - PM.add(createCFGSimplificationPass()); + if (!Fast) PM.add(createCFGSimplificationPass()); // FIXME: Implement the switch instruction in the instruction selector! PM.add(createLowerSwitchPass()); diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.h b/llvm/lib/Target/PowerPC/PPCTargetMachine.h index 1295a599107..dff48348de5 100644 --- a/llvm/lib/Target/PowerPC/PPCTargetMachine.h +++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.h @@ -53,7 +53,7 @@ public: static unsigned getModuleMatchQuality(const Module &M); virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out, - CodeGenFileType FileType); + CodeGenFileType FileType, bool Fast); bool addPassesToEmitMachineCode(FunctionPassManager &PM, MachineCodeEmitter &MCE); |