File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -896,15 +896,10 @@ GCNScheduleDAGMILive::getRegionLiveInMap() const {
896
896
assert (!Regions.empty ());
897
897
std::vector<MachineInstr *> RegionFirstMIs;
898
898
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
+
908
903
return getLiveRegMap (RegionFirstMIs, /* After=*/ false , *LIS);
909
904
}
910
905
You can’t perform that action at this time.
0 commit comments