[llvm-commits] CVS: llvm/lib/Target/Sparc/Sparc.cpp

Misha Brukman brukman at cs.uiuc.edu
Wed Aug 6 18:07:01 PDT 2003


Changes in directory llvm/lib/Target/Sparc:

Sparc.cpp updated: 1.71 -> 1.72

---
Log message:

* Renamed option from `nopreselect' to `nopreopt' since it disables more than
  just PreSelection 
* Wrapped code at 80 columns
* Added the DecomposeMultiDimRefs Pass to the JIT compilation path


---
Diffs of the changes:

Index: llvm/lib/Target/Sparc/Sparc.cpp
diff -u llvm/lib/Target/Sparc/Sparc.cpp:1.71 llvm/lib/Target/Sparc/Sparc.cpp:1.72
--- llvm/lib/Target/Sparc/Sparc.cpp:1.71	Fri Aug  1 10:53:24 2003
+++ llvm/lib/Target/Sparc/Sparc.cpp	Wed Aug  6 18:06:21 2003
@@ -38,8 +38,8 @@
 // Command line options to control choice of code generation passes.
 //---------------------------------------------------------------------------
 
-static cl::opt<bool> DisablePreSelect("nopreselect",
-                                      cl::desc("Disable preselection pass"));
+static cl::opt<bool> DisablePreOpt("nopreopt",
+              cl::desc("Disable optimizations prior to instruction selection"));
 
 static cl::opt<bool> DisableSched("nosched",
                                   cl::desc("Disable local scheduling pass"));
@@ -171,10 +171,10 @@
   //so %fp+offset-8 and %fp+offset-16 are empty slots now!
   PM.add(createStackSlotsPass(*this));
 
-  // Specialize LLVM code for this target machine and then
-  // run basic dataflow optimizations on LLVM code.
-  if (!DisablePreSelect) {
+  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());
@@ -182,7 +182,8 @@
   
   // If LLVM dumping after transformations is requested, add it to the pipeline
   if (DumpInput)
-    PM.add(new PrintFunctionPass("Input code to instr. selection: \n", &std::cerr));
+    PM.add(new PrintFunctionPass("Input code to instsr. selection:\n",
+                                 &std::cerr));
 
   PM.add(createInstructionSelectionPass(*this));
 
@@ -233,6 +234,9 @@
   // FIXME: implement the switch instruction in the instruction selector.
   PM.add(createLowerSwitchPass());
 
+  // decompose multi-dimensional array references into single-dim refs
+  PM.add(createDecomposeMultiDimRefsPass());
+  
   // Construct and initialize the MachineFunction object for this fn.
   PM.add(createMachineCodeConstructionPass(*this));
 





More information about the llvm-commits mailing list