llvm.org GIT mirror llvm / 87fd46a
[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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302812 91177308-0d34-0410-b5e6-96231b3b80d8 Stanislav Mekhanoshin 3 years ago
1 changed file(s) with 3 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
421421 unsigned SGPRs = 0;
422422 unsigned VGPRs = 0;
423423
424 auto &MI = *begin()->getParent()->getFirstNonDebugInstr();
424 auto I = begin();
425 I = skipDebugInstructionsForward(I, I->getParent()->end());
425426 const SIRegisterInfo *SRI = static_cast(TRI);
426 SlotIndex SI = LIS->getInstructionIndex(MI).getBaseIndex();
427 SlotIndex SI = LIS->getInstructionIndex(*I).getBaseIndex();
427428 assert (SI.isValid());
428429
429430 DEBUG(dbgs() << "Region live-ins:");