aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/LoopInfo.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-02-12 22:39:50 +0000
committerChris Lattner <sabre@nondot.org>2002-02-12 22:39:50 +0000
commit455889aa79e3463a4b0f2161e3d9d72a683268b6 (patch)
treeaf1cb8e20b69e33a7a744365fb6e15445abf81ed /lib/Analysis/LoopInfo.cpp
parentcc179d3ab85fd19c3fd9586409c69d14fbb6c642 (diff)
* Pull BasicBlock::pred_* and BasicBlock::succ_* out of BasicBlock.h and into
llvm/Support/CFG.h * Make pred & succ iterators for intervals global functions * Add #includes that are now neccesary because BasicBlock.h doesn't include InstrTypes.h anymore git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1750 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/LoopInfo.cpp')
-rw-r--r--lib/Analysis/LoopInfo.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Analysis/LoopInfo.cpp b/lib/Analysis/LoopInfo.cpp
index 876161d34f..344e3a446b 100644
--- a/lib/Analysis/LoopInfo.cpp
+++ b/lib/Analysis/LoopInfo.cpp
@@ -61,8 +61,7 @@ cfg::Loop *cfg::LoopInfo::ConsiderForLoop(const BasicBlock *BB,
// Scan the predecessors of BB, checking to see if BB dominates any of
// them.
- for (BasicBlock::pred_const_iterator I = BB->pred_begin(),
- E = BB->pred_end(); I != E; ++I)
+ for (pred_const_iterator I = pred_begin(BB), E = pred_end(BB); I != E; ++I)
if (DS.dominates(BB, *I)) // If BB dominates it's predecessor...
TodoStack.push_back(*I);
@@ -80,7 +79,7 @@ cfg::Loop *cfg::LoopInfo::ConsiderForLoop(const BasicBlock *BB,
L->Blocks.push_back(X);
// Add all of the predecessors of X to the end of the work stack...
- TodoStack.insert(TodoStack.end(), X->pred_begin(), X->pred_end());
+ TodoStack.insert(TodoStack.end(), pred_begin(X), pred_end(X));
}
}