diff options
author | Chris Lattner <sabre@nondot.org> | 2005-11-08 02:12:47 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-11-08 02:12:47 +0000 |
commit | df2e425f2a3b64eb17be927539cd39cb1f1c5f77 (patch) | |
tree | 8f32ec62c2107d0bf7fa11417191670e5bbce1b6 /lib/Target/PowerPC | |
parent | 178e0c41ce22160e6a1005420a52c29162dd87d3 (diff) | |
download | external_llvm-df2e425f2a3b64eb17be927539cd39cb1f1c5f77.zip external_llvm-df2e425f2a3b64eb17be927539cd39cb1f1c5f77.tar.gz external_llvm-df2e425f2a3b64eb17be927539cd39cb1f1c5f77.tar.bz2 |
Add a new option to indicate we want the code generator to emit code quickly,
not spending tons of time microoptimizing it. This is useful for an -O0
style of build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24235 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC')
-rw-r--r-- | lib/Target/PowerPC/PPCTargetMachine.cpp | 7 | ||||
-rw-r--r-- | lib/Target/PowerPC/PPCTargetMachine.h | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp index 9a88750..c92122e 100644 --- a/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/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/lib/Target/PowerPC/PPCTargetMachine.h b/lib/Target/PowerPC/PPCTargetMachine.h index 1295a59..dff4834 100644 --- a/lib/Target/PowerPC/PPCTargetMachine.h +++ b/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); |