mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
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:
@@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user