[llvm] r278606 - [IRCE] Use range-for; NFC

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 13 15:00:09 PDT 2016


Author: sanjoy
Date: Sat Aug 13 17:00:09 2016
New Revision: 278606

URL: http://llvm.org/viewvc/llvm-project?rev=278606&view=rev
Log:
[IRCE] Use range-for; NFC

Modified:
    llvm/trunk/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp?rev=278606&r1=278605&r2=278606&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp Sat Aug 13 17:00:09 2016
@@ -925,13 +925,11 @@ void LoopConstrainer::cloneLoop(LoopCons
     // 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;
 




More information about the llvm-commits mailing list