aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/ModuloSchedule.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2021-11-06 18:31:18 -0800
committerKazu Hirata <kazu@google.com>2021-11-06 19:31:18 -0700
commit843d1eda18c3a7a700fe0858748e175727498d21 (patch)
tree2d232f95f6d6c42ac6b3bef8859f27ce02ad5d26 /llvm/lib/CodeGen/ModuloSchedule.cpp
parentbbab17c6c987d7a6612855c02a4e8988dac0dc17 (diff)
downloadllvm-843d1eda18c3a7a700fe0858748e175727498d21.zip
llvm-843d1eda18c3a7a700fe0858748e175727498d21.tar.gz
llvm-843d1eda18c3a7a700fe0858748e175727498d21.tar.bz2
[llvm] Use llvm::reverse (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/ModuloSchedule.cpp')
-rw-r--r--llvm/lib/CodeGen/ModuloSchedule.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/ModuloSchedule.cpp b/llvm/lib/CodeGen/ModuloSchedule.cpp
index 750097d..43cca1b 100644
--- a/llvm/lib/CodeGen/ModuloSchedule.cpp
+++ b/llvm/lib/CodeGen/ModuloSchedule.cpp
@@ -700,11 +700,9 @@ void ModuloScheduleExpander::removeDeadInstructions(MachineBasicBlock *KernelBB,
MBBVectorTy &EpilogBBs) {
// For each epilog block, check that the value defined by each instruction
// is used. If not, delete it.
- for (MBBVectorTy::reverse_iterator MBB = EpilogBBs.rbegin(),
- MBE = EpilogBBs.rend();
- MBB != MBE; ++MBB)
- for (MachineBasicBlock::reverse_instr_iterator MI = (*MBB)->instr_rbegin(),
- ME = (*MBB)->instr_rend();
+ for (MachineBasicBlock *MBB : llvm::reverse(EpilogBBs))
+ for (MachineBasicBlock::reverse_instr_iterator MI = MBB->instr_rbegin(),
+ ME = MBB->instr_rend();
MI != ME;) {
// From DeadMachineInstructionElem. Don't delete inline assembly.
if (MI->isInlineAsm()) {