diff options
Diffstat (limited to 'lib/Transforms/Scalar/IndVarSimplify.cpp')
-rw-r--r-- | lib/Transforms/Scalar/IndVarSimplify.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index ed02e3a00b..f631b69f0a 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -43,8 +43,8 @@ namespace { Changed = false; // Induction Variables live in the header nodes of loops - for (unsigned i = 0, e = Loops->getTopLevelLoops().size(); i != e; ++i) - runOnLoop(Loops->getTopLevelLoops()[i]); + for (LoopInfo::iterator I = Loops->begin(), E = Loops->end(); I != E; ++I) + runOnLoop(*I); return Changed; } @@ -77,8 +77,8 @@ Pass *llvm::createIndVarSimplifyPass() { void IndVarSimplify::runOnLoop(Loop *Loop) { // Transform all subloops before this loop... - for (unsigned i = 0, e = Loop->getSubLoops().size(); i != e; ++i) - runOnLoop(Loop->getSubLoops()[i]); + for (LoopInfo::iterator I = Loop->begin(), E = Loop->end(); I != E; ++I) + runOnLoop(*I); // Get the header node for this loop. All of the phi nodes that could be // induction variables must live in this basic block. |