[AMDGPU] Fix incorrect register pressure calculation
Earlier fix D32572 introduced a bug where live-ins were calculated for basic block instead of scheduling region. This change fixes it. Differential Revision: https://reviews.llvm.org/D33086 llvm-svn: 302812
This commit is contained in:
parent
0aca09fc6c
commit
33a97ec4ed
|
@ -422,9 +422,10 @@ void GCNScheduleDAGMILive::discoverLiveIns() {
|
|||
unsigned SGPRs = 0;
|
||||
unsigned VGPRs = 0;
|
||||
|
||||
auto &MI = *begin()->getParent()->getFirstNonDebugInstr();
|
||||
auto I = begin();
|
||||
I = skipDebugInstructionsForward(I, I->getParent()->end());
|
||||
const SIRegisterInfo *SRI = static_cast<const SIRegisterInfo*>(TRI);
|
||||
SlotIndex SI = LIS->getInstructionIndex(MI).getBaseIndex();
|
||||
SlotIndex SI = LIS->getInstructionIndex(*I).getBaseIndex();
|
||||
assert (SI.isValid());
|
||||
|
||||
DEBUG(dbgs() << "Region live-ins:");
|
||||
|
|
Loading…
Reference in New Issue