From 877333b99dd830c3e8bb7eaa1345ea942d29fc06 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 6 Jun 2008 19:52:44 +0000 Subject: Enable stack coloring by default. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52057 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/LLVMTargetMachine.cpp | 10 ++-------- lib/CodeGen/README.txt | 9 +++++++++ 2 files changed, 11 insertions(+), 8 deletions(-) (limited to 'lib/CodeGen') diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp index d3e8e4904f..1c8ce0a44c 100644 --- a/lib/CodeGen/LLVMTargetMachine.cpp +++ b/lib/CodeGen/LLVMTargetMachine.cpp @@ -38,10 +38,6 @@ static cl::opt EnableSinking("enable-sinking", cl::init(false), cl::Hidden, cl::desc("Perform sinking on machine code")); static cl::opt -EnableStackColoring("stack-coloring", - cl::init(false), cl::Hidden, - cl::desc("Perform stack slot coloring")); -static cl::opt EnableLICM("machine-licm", cl::init(false), cl::Hidden, cl::desc("Perform loop-invariant code motion on machine code")); @@ -103,8 +99,7 @@ LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM, 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 @@ bool LLVMTargetMachine::addPassesToEmitMachineCode(PassManagerBase &PM, PM.add(createRegisterAllocator()); // Perform stack slot coloring. - if (EnableStackColoring) - PM.add(createStackSlotColoringPass()); + PM.add(createStackSlotColoringPass()); if (PrintMachineCode) PM.add(createMachineFunctionPrinterPass(cerr)); diff --git a/lib/CodeGen/README.txt b/lib/CodeGen/README.txt index a66fc9dcdc..d5ddd21796 100644 --- a/lib/CodeGen/README.txt +++ b/lib/CodeGen/README.txt @@ -197,3 +197,12 @@ It would be really nice to be able to write patterns in .td files for copies, 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, , 4, 1, 1, 1, , 4 => 4, 1, 1, 1, 1, 4, 4 -- cgit v1.2.3