Skip to content

Commit 076208b

Browse files
committed
[AMDGPU] Don't skip regions in getRegionLiveInMap
Change-Id: If8c3fe02d56aa390f921123e02443386cbc600a1
1 parent e6f360b commit 076208b

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -896,15 +896,10 @@ GCNScheduleDAGMILive::getRegionLiveInMap() const {
896896
assert(!Regions.empty());
897897
std::vector<MachineInstr *> RegionFirstMIs;
898898
RegionFirstMIs.reserve(Regions.size());
899-
auto I = Regions.rbegin(), E = Regions.rend();
900-
do {
901-
const MachineBasicBlock *MBB = I->first->getParent();
902-
auto *MI = &*skipDebugInstructionsForward(I->first, I->second);
903-
RegionFirstMIs.push_back(MI);
904-
do {
905-
++I;
906-
} while (I != E && I->first->getParent() == MBB);
907-
} while (I != E);
899+
for (auto &[RegionBegin, RegionEnd] : reverse(Regions))
900+
RegionFirstMIs.push_back(
901+
&*skipDebugInstructionsForward(RegionBegin, RegionEnd));
902+
908903
return getLiveRegMap(RegionFirstMIs, /*After=*/false, *LIS);
909904
}
910905

0 commit comments

Comments
 (0)