[llvm] r258944 - [IndVars] Use range-for; NFC

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 27 09:05:03 PST 2016


Author: sanjoy
Date: Wed Jan 27 11:05:03 2016
New Revision: 258944

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

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

Modified: llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp?rev=258944&r1=258943&r2=258944&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Wed Jan 27 11:05:03 2016
@@ -550,9 +550,7 @@ void IndVarSimplify::rewriteLoopExitValu
   // Find all values that are computed inside the loop, but used outside of it.
   // Because of LCSSA, these values will only occur in LCSSA PHI Nodes.  Scan
   // the exit blocks of the loop to find them.
-  for (unsigned i = 0, e = ExitBlocks.size(); i != e; ++i) {
-    BasicBlock *ExitBB = ExitBlocks[i];
-
+  for (BasicBlock *ExitBB : ExitBlocks) {
     // If there are no PHI nodes in this exit block, then no values defined
     // inside the loop are used on this path, skip it.
     PHINode *PN = dyn_cast<PHINode>(ExitBB->begin());




More information about the llvm-commits mailing list