mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
RegAlloc superpass: includes phi elimination, coalescing, and scheduling.
Creates a configurable regalloc pipeline. Ensure specific llc options do what they say and nothing more: -reglloc=... has no effect other than selecting the allocator pass itself. This patch introduces a new umbrella flag, "-optimize-regalloc", to enable/disable the optimizing regalloc "superpass". This allows for example testing coalscing and scheduling under -O0 or vice-versa. When a CodeGen pass requires the MachineFunction to have a particular property, we need to explicitly define that property so it can be directly queried rather than naming a specific Pass. For example, to check for SSA, use MRI->isSSA, not addRequired<PHIElimination>. CodeGen transformation passes are never "required" as an analysis ProcessImplicitDefs does not require LiveVariables. We have a plan to massively simplify some of the early passes within the regalloc superpass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150226 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -51,13 +51,6 @@ STATISTIC(NumGlobalSplits, "Number of split global live ranges");
|
||||
STATISTIC(NumLocalSplits, "Number of split local live ranges");
|
||||
STATISTIC(NumEvicted, "Number of interferences evicted");
|
||||
|
||||
/// EnableMachineSched - temporary flag to enable the machine scheduling pass
|
||||
/// until we complete the register allocation pass configuration cleanup.
|
||||
static cl::opt<bool>
|
||||
EnableMachineSched("enable-misched",
|
||||
cl::desc("Enable the machine instruction scheduling pass."),
|
||||
cl::init(false), cl::Hidden);
|
||||
|
||||
static cl::opt<SplitEditor::ComplementSpillMode>
|
||||
SplitSpillMode("split-spill-mode", cl::Hidden,
|
||||
cl::desc("Spill mode for splitting live ranges"),
|
||||
@@ -327,7 +320,6 @@ RAGreedy::RAGreedy(): MachineFunctionPass(ID) {
|
||||
initializeSlotIndexesPass(*PassRegistry::getPassRegistry());
|
||||
initializeLiveIntervalsPass(*PassRegistry::getPassRegistry());
|
||||
initializeSlotIndexesPass(*PassRegistry::getPassRegistry());
|
||||
initializeStrongPHIEliminationPass(*PassRegistry::getPassRegistry());
|
||||
initializeRegisterCoalescerPass(*PassRegistry::getPassRegistry());
|
||||
initializeMachineSchedulerPass(*PassRegistry::getPassRegistry());
|
||||
initializeCalculateSpillWeightsPass(*PassRegistry::getPassRegistry());
|
||||
@@ -348,11 +340,6 @@ void RAGreedy::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addPreserved<SlotIndexes>();
|
||||
AU.addRequired<LiveDebugVariables>();
|
||||
AU.addPreserved<LiveDebugVariables>();
|
||||
if (StrongPHIElim)
|
||||
AU.addRequiredID(StrongPHIEliminationID);
|
||||
AU.addRequiredTransitiveID(RegisterCoalescerPassID);
|
||||
if (EnableMachineSched)
|
||||
AU.addRequiredID(MachineSchedulerID);
|
||||
AU.addRequired<CalculateSpillWeights>();
|
||||
AU.addRequired<LiveStacks>();
|
||||
AU.addPreserved<LiveStacks>();
|
||||
|
||||
Reference in New Issue
Block a user