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
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:");