mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 16:17:17 +00:00
Enable stack coloring by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52057 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -38,10 +38,6 @@ static cl::opt<bool>
|
|||||||
EnableSinking("enable-sinking", cl::init(false), cl::Hidden,
|
EnableSinking("enable-sinking", cl::init(false), cl::Hidden,
|
||||||
cl::desc("Perform sinking on machine code"));
|
cl::desc("Perform sinking on machine code"));
|
||||||
static cl::opt<bool>
|
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",
|
EnableLICM("machine-licm",
|
||||||
cl::init(false), cl::Hidden,
|
cl::init(false), cl::Hidden,
|
||||||
cl::desc("Perform loop-invariant code motion on machine code"));
|
cl::desc("Perform loop-invariant code motion on machine code"));
|
||||||
@@ -103,8 +99,7 @@ LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
|
|||||||
PM.add(createRegisterAllocator());
|
PM.add(createRegisterAllocator());
|
||||||
|
|
||||||
// Perform stack slot coloring.
|
// Perform stack slot coloring.
|
||||||
if (EnableStackColoring)
|
PM.add(createStackSlotColoringPass());
|
||||||
PM.add(createStackSlotColoringPass());
|
|
||||||
|
|
||||||
if (PrintMachineCode) // Print the register-allocated code
|
if (PrintMachineCode) // Print the register-allocated code
|
||||||
PM.add(createMachineFunctionPrinterPass(cerr));
|
PM.add(createMachineFunctionPrinterPass(cerr));
|
||||||
@@ -240,8 +235,7 @@ bool LLVMTargetMachine::addPassesToEmitMachineCode(PassManagerBase &PM,
|
|||||||
PM.add(createRegisterAllocator());
|
PM.add(createRegisterAllocator());
|
||||||
|
|
||||||
// Perform stack slot coloring.
|
// Perform stack slot coloring.
|
||||||
if (EnableStackColoring)
|
PM.add(createStackSlotColoringPass());
|
||||||
PM.add(createStackSlotColoringPass());
|
|
||||||
|
|
||||||
if (PrintMachineCode)
|
if (PrintMachineCode)
|
||||||
PM.add(createMachineFunctionPrinterPass(cerr));
|
PM.add(createMachineFunctionPrinterPass(cerr));
|
||||||
|
@@ -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
|
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
|
effects). Once this is in place, it would be even better to have tblgen
|
||||||
synthesize the various copy insertion/inspection methods in TargetInstrInfo.
|
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
|
||||||
|
Reference in New Issue
Block a user