diff options
author | Chris Lattner <sabre@nondot.org> | 2004-01-08 00:09:44 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-01-08 00:09:44 +0000 |
commit | 329c1c6c949d07e3fe9722ec633b4258217fd99d (patch) | |
tree | 34270cc171608437ca572bfc081ea6bab2fe0d80 /lib/Transforms/Scalar/IndVarSimplify.cpp | |
parent | f789d409faec2c133039d1b1a0c27f2bb7065cd8 (diff) |
Improve encapsulation in the Loop and LoopInfo classes by eliminating the
getSubLoops/getTopLevelLoops methods, replacing them with iterator-based
accessors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10714 91177308-0d34-0410-b5e6-96231b3b80d8
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. |