mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
Add an experimental -early-live-intervals option.
This option runs LiveIntervals before TwoAddressInstructionPass which will eventually learn to exploit and update the analysis. Eventually, LiveIntervals will run before PHIElimination, and we can get rid of LiveVariables. llvm-svn: 161270
This commit is contained in:
parent
1e192f98dd
commit
14c88af5f2
@ -315,6 +315,10 @@ namespace llvm {
|
||||
/// This pass is still in development
|
||||
extern char &StrongPHIEliminationID;
|
||||
|
||||
/// LiveIntervals - This analysis keeps track of the live ranges of virtual
|
||||
/// and physical registers.
|
||||
extern char &LiveIntervalsID;
|
||||
|
||||
/// LiveStacks pass. An analysis keeping track of the liveness of stack slots.
|
||||
extern char &LiveStacksID;
|
||||
|
||||
|
@ -45,6 +45,7 @@ NewLiveIntervals("new-live-intervals", cl::Hidden,
|
||||
cl::desc("Use new algorithm forcomputing live intervals"));
|
||||
|
||||
char LiveIntervals::ID = 0;
|
||||
char &llvm::LiveIntervalsID = LiveIntervals::ID;
|
||||
INITIALIZE_PASS_BEGIN(LiveIntervals, "liveintervals",
|
||||
"Live Interval Analysis", false, false)
|
||||
INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
|
||||
|
@ -88,6 +88,10 @@ PrintMachineInstrs("print-machineinstrs", cl::ValueOptional,
|
||||
cl::desc("Print machine instrs"),
|
||||
cl::value_desc("pass-name"), cl::init("option-unspecified"));
|
||||
|
||||
// Experimental option to run live inteerval analysis early.
|
||||
static cl::opt<bool> EarlyLiveIntervals("early-live-intervals", cl::Hidden,
|
||||
cl::desc("Run live interval analysis earlier in the pipeline"));
|
||||
|
||||
/// Allow standard passes to be disabled by command line options. This supports
|
||||
/// simple binary flags that either suppress the pass or do nothing.
|
||||
/// i.e. -disable-mypass=false has no effect.
|
||||
@ -648,6 +652,11 @@ void TargetPassConfig::addOptimizedRegAlloc(FunctionPass *RegAllocPass) {
|
||||
addPass(&MachineLoopInfoID);
|
||||
addPass(&PHIEliminationID);
|
||||
}
|
||||
|
||||
// Eventually, we want to run LiveIntervals before PHI elimination.
|
||||
if (EarlyLiveIntervals)
|
||||
addPass(&LiveIntervalsID);
|
||||
|
||||
addPass(&TwoAddressInstructionPassID);
|
||||
|
||||
if (EnableStrongPHIElim)
|
||||
|
Loading…
Reference in New Issue
Block a user