aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2016-01-27 17:05:03 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2016-01-27 17:05:03 +0000
commit8fdf87c3380c250b1d042c76126cf6d06ad14b6e (patch)
treedc7867cba2667c670a74402fc2a6c670bb2c126a /llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
parent7ae98efe85257e2a6c6e250a8448902175985aad (diff)
downloadllvm-8fdf87c3380c250b1d042c76126cf6d06ad14b6e.zip
llvm-8fdf87c3380c250b1d042c76126cf6d06ad14b6e.tar.gz
llvm-8fdf87c3380c250b1d042c76126cf6d06ad14b6e.tar.bz2
[IndVars] Use range-for; NFC
llvm-svn: 258944
Diffstat (limited to 'llvm/lib/Transforms/Scalar/IndVarSimplify.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/IndVarSimplify.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
index 8a3606f..f47eaf9 100644
--- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -550,9 +550,7 @@ void IndVarSimplify::rewriteLoopExitValues(Loop *L, SCEVExpander &Rewriter) {
// 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());