[llvm-commits] CVS: llvm/lib/Target/Sparc/Sparc.cpp
Misha Brukman
brukman at cs.uiuc.edu
Fri Nov 7 14:34:01 PST 2003
Changes in directory llvm/lib/Target/Sparc:
Sparc.cpp updated: 1.87 -> 1.88
---
Log message:
PreSelection is not optional, it performs a necessary and vital transformation
for the Sparc backend: breaking up constant expressions. Thus, we cannot have it
guarded by a conditional, it should never be disabled.
Also, it's now available for the JIT since it is a FunctionPass.
---
Diffs of the changes: (+15 -12)
Index: llvm/lib/Target/Sparc/Sparc.cpp
diff -u llvm/lib/Target/Sparc/Sparc.cpp:1.87 llvm/lib/Target/Sparc/Sparc.cpp:1.88
--- llvm/lib/Target/Sparc/Sparc.cpp:1.87 Mon Oct 20 15:44:03 2003
+++ llvm/lib/Target/Sparc/Sparc.cpp Fri Nov 7 14:33:25 2003
@@ -42,9 +42,6 @@
// Command line options to control choice of code generation passes.
//---------------------------------------------------------------------------
-static cl::opt<bool> DisablePreOpt("disable-preopt",
- cl::desc("Disable optimizations prior to instruction selection"));
-
static cl::opt<bool> DisableSched("disable-sched",
cl::desc("Disable local scheduling pass"));
@@ -178,15 +175,13 @@
//so %fp+offset-8 and %fp+offset-16 are empty slots now!
PM.add(createStackSlotsPass(*this));
- if (!DisablePreOpt) {
- // Specialize LLVM code for this target machine
- PM.add(createPreSelectionPass(*this));
- // Run basic dataflow optimizations on LLVM code
- PM.add(createReassociatePass());
- PM.add(createLICMPass());
- PM.add(createGCSEPass());
- }
-
+ // Specialize LLVM code for this target machine
+ PM.add(createPreSelectionPass(*this));
+ // Run basic dataflow optimizations on LLVM code
+ PM.add(createReassociatePass());
+ PM.add(createLICMPass());
+ PM.add(createGCSEPass());
+
// If LLVM dumping after transformations is requested, add it to the pipeline
if (DumpInput)
PM.add(new PrintFunctionPass("Input code to instr. selection:\n",
@@ -251,6 +246,14 @@
// Construct and initialize the MachineFunction object for this fn.
PM.add(createMachineCodeConstructionPass(*this));
+
+ // Specialize LLVM code for this target machine and then
+ // run basic dataflow optimizations on LLVM code.
+ PM.add(createPreSelectionPass(*this));
+ // Run basic dataflow optimizations on LLVM code
+ PM.add(createReassociatePass());
+ PM.add(createLICMPass());
+ PM.add(createGCSEPass());
PM.add(createInstructionSelectionPass(*this));
More information about the llvm-commits
mailing list