mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 12:50:30 +00:00
Added -precompute-phys-liveness for testing LiveIntervals updates.
llvm-svn: 184573
This commit is contained in:
parent
54670161c3
commit
5d17d8d8d7
@ -52,6 +52,14 @@ INITIALIZE_PASS_DEPENDENCY(SlotIndexes)
|
||||
INITIALIZE_PASS_END(LiveIntervals, "liveintervals",
|
||||
"Live Interval Analysis", false, false)
|
||||
|
||||
#ifndef NDEBUG
|
||||
static cl::opt<bool> EnablePrecomputePhysRegs(
|
||||
"precompute-phys-liveness", cl::Hidden,
|
||||
cl::desc("Eagerly compute live intervals for all physreg units."));
|
||||
#else
|
||||
static bool EnablePrecomputePhysRegs = false;
|
||||
#endif // NDEBUG
|
||||
|
||||
void LiveIntervals::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesCFG();
|
||||
AU.addRequired<AliasAnalysis>();
|
||||
@ -116,6 +124,12 @@ bool LiveIntervals::runOnMachineFunction(MachineFunction &fn) {
|
||||
computeRegMasks();
|
||||
computeLiveInRegUnits();
|
||||
|
||||
if (EnablePrecomputePhysRegs) {
|
||||
// For stress testing, precompute live ranges of all physical register
|
||||
// units, including reserved registers.
|
||||
for (unsigned i = 0, e = TRI->getNumRegUnits(); i != e; ++i)
|
||||
getRegUnit(i);
|
||||
}
|
||||
DEBUG(dump());
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user