[llvm-commits] [llvm] r52057 - in /llvm/trunk/lib/CodeGen: LLVMTargetMachine.cpp README.txt

Evan Cheng evan.cheng at apple.com
Fri Jun 6 12:52:44 PDT 2008


Author: evancheng
Date: Fri Jun  6 14:52:44 2008
New Revision: 52057

URL: http://llvm.org/viewvc/llvm-project?rev=52057&view=rev
Log:
Enable stack coloring by default.

Modified:
    llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
    llvm/trunk/lib/CodeGen/README.txt

Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=52057&r1=52056&r2=52057&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original)
+++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Fri Jun  6 14:52:44 2008
@@ -38,10 +38,6 @@
 EnableSinking("enable-sinking", cl::init(false), cl::Hidden,
               cl::desc("Perform sinking on machine code"));
 static cl::opt<bool>
-EnableStackColoring("stack-coloring",
-            cl::init(false), cl::Hidden,
-            cl::desc("Perform stack slot coloring"));
-static cl::opt<bool>
 EnableLICM("machine-licm",
            cl::init(false), cl::Hidden,
            cl::desc("Perform loop-invariant code motion on machine code"));
@@ -103,8 +99,7 @@
   PM.add(createRegisterAllocator());
   
   // Perform stack slot coloring.
-  if (EnableStackColoring)
-    PM.add(createStackSlotColoringPass());
+  PM.add(createStackSlotColoringPass());
 
   if (PrintMachineCode)  // Print the register-allocated code
     PM.add(createMachineFunctionPrinterPass(cerr));
@@ -240,8 +235,7 @@
   PM.add(createRegisterAllocator());
 
   // Perform stack slot coloring.
-  if (EnableStackColoring)
-    PM.add(createStackSlotColoringPass());
+  PM.add(createStackSlotColoringPass());
 
   if (PrintMachineCode)
     PM.add(createMachineFunctionPrinterPass(cerr));

Modified: llvm/trunk/lib/CodeGen/README.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/README.txt?rev=52057&r1=52056&r2=52057&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/README.txt (original)
+++ llvm/trunk/lib/CodeGen/README.txt Fri Jun  6 14:52:44 2008
@@ -197,3 +197,12 @@
 which would eliminate a bunch of explicit predicates on them (e.g. no side 
 effects).  Once this is in place, it would be even better to have tblgen 
 synthesize the various copy insertion/inspection methods in TargetInstrInfo.
+
+//===---------------------------------------------------------------------===//
+
+Stack coloring improvments:
+
+1. Do proper LiveStackAnalysis on all stack objects including those which are
+   not spill slots.
+2. Reorder objects to fill in gaps between objects.
+   e.g. 4, 1, <gap>, 4, 1, 1, 1, <gap>, 4 => 4, 1, 1, 1, 1, 4, 4





More information about the llvm-commits mailing list