diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2021-11-19 20:06:13 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2021-11-19 20:06:13 +0000 |
| commit | c0981da47d5696fe36474fcf86b4ce03ae3ff818 (patch) | |
| tree | f42add1021b9f2ac6a69ac7cf6c4499962739a45 /llvm/lib/Target/AMDGPU/SIModeRegister.cpp | |
| parent | 344a3780b2e33f6ca763666c380202b18aab72a3 (diff) | |
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SIModeRegister.cpp')
| -rw-r--r-- | llvm/lib/Target/AMDGPU/SIModeRegister.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIModeRegister.cpp b/llvm/lib/Target/AMDGPU/SIModeRegister.cpp index 3d659eca47db..69eab762f05c 100644 --- a/llvm/lib/Target/AMDGPU/SIModeRegister.cpp +++ b/llvm/lib/Target/AMDGPU/SIModeRegister.cpp @@ -225,7 +225,7 @@ void SIModeRegister::processBlockPhase1(MachineBasicBlock &MBB, // RequirePending is used to indicate whether we are collecting the initial // requirements for the block, and need to defer the first InsertionPoint to // Phase 3. It is set to false once we have set FirstInsertionPoint, or when - // we discover an explict setreg that means this block doesn't have any + // we discover an explicit setreg that means this block doesn't have any // initial requirements. bool RequirePending = true; Status IPChange; @@ -373,12 +373,8 @@ void SIModeRegister::processBlockPhase2(MachineBasicBlock &MBB, BlockInfo[ThisBlock]->Exit = TmpStatus; // Add the successors to the work list so we can propagate the changed exit // status. - for (MachineBasicBlock::succ_iterator S = MBB.succ_begin(), - E = MBB.succ_end(); - S != E; S = std::next(S)) { - MachineBasicBlock &B = *(*S); - Phase2List.push(&B); - } + for (MachineBasicBlock *Succ : MBB.successors()) + Phase2List.push(Succ); } BlockInfo[ThisBlock]->ExitSet = ExitSet; if (RevisitRequired) |
