summaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/IntervalIterator.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-10-01 13:19:41 +0000
committerChris Lattner <sabre@nondot.org>2001-10-01 13:19:41 +0000
commit711774e169526247db1838b96e379a4f4e9f2cad (patch)
tree3cbd71dc008bb1a650f7554a70b1884f4ddaa069 /include/llvm/Analysis/IntervalIterator.h
parenta9a090b483d1909638417e89a3015c685540618f (diff)
downloadllvm-711774e169526247db1838b96e379a4f4e9f2cad.tar.gz
llvm-711774e169526247db1838b96e379a4f4e9f2cad.tar.bz2
llvm-711774e169526247db1838b96e379a4f4e9f2cad.tar.xz
Pull predecessor and successor iterators out of the CFG*.h files, and plop them into
the BasicBlock class where they should be. pred_begin/pred_end become methods on BasicBlock, and the cfg namespace isn't used anymore. Also pull Interval stuff into the Interval class out of the global namespace git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@690 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/IntervalIterator.h')
-rw-r--r--include/llvm/Analysis/IntervalIterator.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/include/llvm/Analysis/IntervalIterator.h b/include/llvm/Analysis/IntervalIterator.h
index e3c2d08de8..454c0ca07e 100644
--- a/include/llvm/Analysis/IntervalIterator.h
+++ b/include/llvm/Analysis/IntervalIterator.h
@@ -28,7 +28,6 @@
#include "llvm/Analysis/IntervalPartition.h"
#include "llvm/Method.h"
-#include "llvm/CFG.h"
#include <stack>
#include <set>
#include <algorithm>
@@ -127,8 +126,8 @@ public:
do {
// All of the intervals on the stack have been visited. Try visiting
// their successors now.
- Interval::succ_iterator &SuccIt = IntStack.top().second,
- EndIt = succ_end(IntStack.top().first);
+ Interval::succ_iterator &SuccIt = IntStack.top().second,
+ EndIt = IntStack.top().first->succ_end();
while (SuccIt != EndIt) { // Loop over all interval succs
bool Done = ProcessInterval(getSourceGraphNode(OrigContainer, *SuccIt));
++SuccIt; // Increment iterator
@@ -165,11 +164,11 @@ private:
Visited.insert(Header); // The header has now been visited!
// Check all of our successors to see if they are in the interval...
- for (typename NodeTy::succ_iterator I = succ_begin(Node),E = succ_end(Node);
- I != E; ++I)
+ for (typename NodeTy::succ_iterator I = Node->succ_begin(),
+ E = Node->succ_end(); I != E; ++I)
ProcessNode(Int, getSourceGraphNode(OrigContainer, *I));
- IntStack.push(make_pair(Int, succ_begin(Int)));
+ IntStack.push(make_pair(Int, Int->succ_begin()));
return true;
}
@@ -196,8 +195,8 @@ private:
Int->Successors.push_back(NodeHeader);
}
} else { // Otherwise, not in interval yet
- for (typename NodeTy::pred_iterator I = pred_begin(Node),
- E = pred_end(Node); I != E; ++I) {
+ for (typename NodeTy::pred_iterator I = Node->pred_begin(),
+ E = Node->pred_end(); I != E; ++I) {
if (!Int->contains(*I)) { // If pred not in interval, we can't be
if (!Int->isSuccessor(NodeHeader)) // Add only if not already in set
Int->Successors.push_back(NodeHeader);
@@ -219,8 +218,8 @@ private:
// Now that we have discovered that Node is in the interval, perhaps some
// of its successors are as well?
- for (typename NodeTy::succ_iterator It = succ_begin(Node),
- End = succ_end(Node); It != End; ++It)
+ for (typename NodeTy::succ_iterator It = Node->succ_begin(),
+ End = Node->succ_end(); It != End; ++It)
ProcessNode(Int, getSourceGraphNode(OrigContainer, *It));
}
}