Add a flag to enable/disable subregister liveness.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223884 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Matthias Braun
2014-12-10 01:12:30 +00:00
parent 4402447964
commit 7fbeb8d1b9
5 changed files with 27 additions and 3 deletions

View File

@@ -63,6 +63,10 @@ static cl::opt<bool> EnablePrecomputePhysRegs(
static bool EnablePrecomputePhysRegs = false;
#endif // NDEBUG
static cl::opt<bool> EnableSubRegLiveness(
"enable-subreg-liveness", cl::Hidden, cl::init(true),
cl::desc("Enable subregister liveness tracking."));
void LiveIntervals::getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesCFG();
AU.addRequired<AliasAnalysis>();
@@ -116,6 +120,10 @@ bool LiveIntervals::runOnMachineFunction(MachineFunction &fn) {
AA = &getAnalysis<AliasAnalysis>();
Indexes = &getAnalysis<SlotIndexes>();
DomTree = &getAnalysis<MachineDominatorTree>();
if (EnableSubRegLiveness && MF->getSubtarget().enableSubRegLiveness())
MRI->enableSubRegLiveness(true);
if (!LRCalc)
LRCalc = new LiveRangeCalc();