Skip to content

Commit 811a20a

Browse files
committed
Range loop
1 parent 89608d3 commit 811a20a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Target/AMDGPU/AMDGPURewriteAGPRCopyMFMA.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -472,12 +472,10 @@ void AMDGPURewriteAGPRCopyMFMAImpl::eliminateSpillsOfReassignedVGPRs() const {
472472
SmallVector<LiveInterval *, 32> StackIntervals;
473473
StackIntervals.reserve(NumSlots);
474474

475-
for (auto I = LSS.begin(), E = LSS.end(); I != E; ++I) {
476-
int Slot = I->first;
475+
for (auto &[Slot, LI] : LSS) {
477476
if (!MFI.isSpillSlotObjectIndex(Slot) || MFI.isDeadObjectIndex(Slot))
478477
continue;
479478

480-
LiveInterval &LI = I->second;
481479
const TargetRegisterClass *RC = LSS.getIntervalRegClass(Slot);
482480
if (TRI.hasVGPRs(RC))
483481
StackIntervals.push_back(&LI);

0 commit comments

Comments
 (0)