diff options
author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2016-08-13 22:00:09 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2016-08-13 22:00:09 +0000 |
commit | d1d62a135485bf07afac2fdf2bf2c23b6a4a10f3 (patch) | |
tree | df3b180c980938e0b1d9c2a7e02f9b15366d7f38 /llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp | |
parent | fa0f96b083503cb57e12c53d25fe2d33dc5bc242 (diff) | |
download | bcm5719-llvm-d1d62a135485bf07afac2fdf2bf2c23b6a4a10f3.tar.gz bcm5719-llvm-d1d62a135485bf07afac2fdf2bf2c23b6a4a10f3.zip |
[IRCE] Use range-for; NFC
llvm-svn: 278606
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp b/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp index f324281c661..2f644406c0f 100644 --- a/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp +++ b/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp @@ -925,13 +925,11 @@ void LoopConstrainer::cloneLoop(LoopConstrainer::ClonedLoop &Result, // to be edited to reflect that. No phi nodes need to be introduced because // the loop is in LCSSA. - for (auto SBBI = succ_begin(OriginalBB), SBBE = succ_end(OriginalBB); - SBBI != SBBE; ++SBBI) { - - if (OriginalLoop.contains(*SBBI)) + for (auto *SBB : successors(OriginalBB)) { + if (OriginalLoop.contains(SBB)) continue; // not an exit block - for (Instruction &I : **SBBI) { + for (Instruction &I : *SBB) { if (!isa<PHINode>(&I)) break; |