aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2021-12-13 21:54:51 -0800
committerKazu Hirata <kazu@google.com>2021-12-13 21:54:51 -0800
commit7787a8f1b7077d9efb53f5023fe044b70ad527b4 (patch)
tree40204583a664e1f9e791a1893f20b64690f52e48 /llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
parent3cda38796c2ab0255be14fecc88fdbbe090367c2 (diff)
downloadllvm-7787a8f1b7077d9efb53f5023fe044b70ad527b4.zip
llvm-7787a8f1b7077d9efb53f5023fe044b70ad527b4.tar.gz
llvm-7787a8f1b7077d9efb53f5023fe044b70ad527b4.tar.bz2
[llvm] Use llvm::reverse (NFC)
Diffstat (limited to 'llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp b/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
index 71c15d5..c840ee8 100644
--- a/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
+++ b/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
@@ -1047,9 +1047,9 @@ bool SCEVExpander::hoistIVInc(Instruction *IncV, Instruction *InsertPos) {
if (SE.DT.dominates(IncV, InsertPos))
break;
}
- for (auto I = IVIncs.rbegin(), E = IVIncs.rend(); I != E; ++I) {
- fixupInsertPoints(*I);
- (*I)->moveBefore(InsertPos);
+ for (Instruction *I : llvm::reverse(IVIncs)) {
+ fixupInsertPoints(I);
+ I->moveBefore(InsertPos);
}
return true;
}