AMDGPU/SI: Update LiveIntervals during SIFixSGPRLiveRanges
Does not mark SlotIndexes as reserved, although I think that might be OK. LiveVariables still need to be handled. llvm-svn: 245133
This commit is contained in:
parent
b75233235c
commit
670ba46efe
|
@ -81,6 +81,10 @@ public:
|
||||||
AU.addRequired<LiveIntervals>();
|
AU.addRequired<LiveIntervals>();
|
||||||
AU.addRequired<MachinePostDominatorTree>();
|
AU.addRequired<MachinePostDominatorTree>();
|
||||||
AU.setPreservesCFG();
|
AU.setPreservesCFG();
|
||||||
|
|
||||||
|
//AU.addPreserved<SlotIndexes>(); // XXX - This might be OK
|
||||||
|
AU.addPreserved<LiveIntervals>();
|
||||||
|
|
||||||
MachineFunctionPass::getAnalysisUsage(AU);
|
MachineFunctionPass::getAnalysisUsage(AU);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -181,10 +185,15 @@ bool SIFixSGPRLiveRanges::runOnMachineFunction(MachineFunction &MF) {
|
||||||
|
|
||||||
// FIXME: Need to figure out how to update LiveRange here so this pass
|
// FIXME: Need to figure out how to update LiveRange here so this pass
|
||||||
// will be able to preserve LiveInterval analysis.
|
// will be able to preserve LiveInterval analysis.
|
||||||
BuildMI(*NCD, NCD->getFirstNonPHI(), DebugLoc(),
|
MachineInstr *NCDSGPRUse =
|
||||||
TII->get(AMDGPU::SGPR_USE))
|
BuildMI(*NCD, NCD->getFirstNonPHI(), DebugLoc(),
|
||||||
.addReg(Reg, RegState::Implicit);
|
TII->get(AMDGPU::SGPR_USE))
|
||||||
DEBUG(NCD->getFirstNonPHI()->dump());
|
.addReg(Reg, RegState::Implicit);
|
||||||
|
|
||||||
|
SlotIndex SI = LIS->InsertMachineInstrInMaps(NCDSGPRUse);
|
||||||
|
LIS->extendToIndices(*LR, SI.getRegSlot());
|
||||||
|
|
||||||
|
DEBUG(NCDSGPRUse->dump());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue