[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCTargetMachine.cpp PPCTargetMachine.h

Chris Lattner lattner at cs.uiuc.edu
Mon Nov 7 18:12:58 PST 2005



Changes in directory llvm/lib/Target/PowerPC:

PPCTargetMachine.cpp updated: 1.76 -> 1.77
PPCTargetMachine.h updated: 1.15 -> 1.16
---
Log message:

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.


---
Diffs of the changes:  (+5 -4)

 PPCTargetMachine.cpp |    7 ++++---
 PPCTargetMachine.h   |    2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
diff -u llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.76 llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.77
--- llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.76	Tue Nov  1 14:07:00 2005
+++ llvm/lib/Target/PowerPC/PPCTargetMachine.cpp	Mon Nov  7 20:12:47 2005
@@ -77,11 +77,12 @@
 ///
 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 @@
   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());


Index: llvm/lib/Target/PowerPC/PPCTargetMachine.h
diff -u llvm/lib/Target/PowerPC/PPCTargetMachine.h:1.15 llvm/lib/Target/PowerPC/PPCTargetMachine.h:1.16
--- llvm/lib/Target/PowerPC/PPCTargetMachine.h:1.15	Tue Nov  1 14:07:00 2005
+++ llvm/lib/Target/PowerPC/PPCTargetMachine.h	Mon Nov  7 20:12:47 2005
@@ -53,7 +53,7 @@
   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);






More information about the llvm-commits mailing list