llvm.org GIT mirror llvm / dcc4436
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161270 91177308-0d34-0410-b5e6-96231b3b80d8 Jakob Stoklund Olesen 7 years ago
3 changed file(s) with 14 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
314314 /// This pass is still in development
315315 extern char &StrongPHIEliminationID;
316316
317 /// LiveIntervals - This analysis keeps track of the live ranges of virtual
318 /// and physical registers.
319 extern char &LiveIntervalsID;
320
317321 /// LiveStacks pass. An analysis keeping track of the liveness of stack slots.
318322 extern char &LiveStacksID;
319323
4444 cl::desc("Use new algorithm forcomputing live intervals"));
4545
4646 char LiveIntervals::ID = 0;
47 char &llvm::LiveIntervalsID = LiveIntervals::ID;
4748 INITIALIZE_PASS_BEGIN(LiveIntervals, "liveintervals",
4849 "Live Interval Analysis", false, false)
4950 INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
8787 cl::desc("Print machine instrs"),
8888 cl::value_desc("pass-name"), cl::init("option-unspecified"));
8989
90 // Experimental option to run live inteerval analysis early.
91 static cl::opt EarlyLiveIntervals("early-live-intervals", cl::Hidden,
92 cl::desc("Run live interval analysis earlier in the pipeline"));
93
9094 /// Allow standard passes to be disabled by command line options. This supports
9195 /// simple binary flags that either suppress the pass or do nothing.
9296 /// i.e. -disable-mypass=false has no effect.
647651 addPass(&MachineLoopInfoID);
648652 addPass(&PHIEliminationID);
649653 }
654
655 // Eventually, we want to run LiveIntervals before PHI elimination.
656 if (EarlyLiveIntervals)
657 addPass(&LiveIntervalsID);
658
650659 addPass(&TwoAddressInstructionPassID);
651660
652661 if (EnableStrongPHIElim)