summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/Interval.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-10-01 13:19:53 +0000
committerChris Lattner <sabre@nondot.org>2001-10-01 13:19:53 +0000
commitba1c1f2fb67148c016861a0c535af8a0af173cce (patch)
treeddfb3a6170a7cc77b26d600cefba1ff81072bbdd /llvm/lib/Analysis/Interval.cpp
parenta7610016a5ba5dacf41f65c25774cc4e198418e5 (diff)
downloadbcm5719-llvm-ba1c1f2fb67148c016861a0c535af8a0af173cce.tar.gz
bcm5719-llvm-ba1c1f2fb67148c016861a0c535af8a0af173cce.zip
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. llvm-svn: 691
Diffstat (limited to 'llvm/lib/Analysis/Interval.cpp')
-rw-r--r--llvm/lib/Analysis/Interval.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/Analysis/Interval.cpp b/llvm/lib/Analysis/Interval.cpp
index 97fa34ea7ae..5c68be9c2e2 100644
--- a/llvm/lib/Analysis/Interval.cpp
+++ b/llvm/lib/Analysis/Interval.cpp
@@ -8,19 +8,17 @@
#include "llvm/Analysis/Interval.h"
#include "llvm/BasicBlock.h"
-using namespace cfg;
-
//===----------------------------------------------------------------------===//
// Interval Implementation
//===----------------------------------------------------------------------===//
// isLoop - Find out if there is a back edge in this interval...
//
-bool Interval::isLoop() const {
+bool cfg::Interval::isLoop() const {
// There is a loop in this interval iff one of the predecessors of the header
// node lives in the interval.
- for (BasicBlock::pred_iterator I = pred_begin(HeaderNode),
- E = pred_end(HeaderNode); I != E; ++I) {
+ for (BasicBlock::pred_iterator I = HeaderNode->pred_begin(),
+ E = HeaderNode->pred_end(); I != E; ++I) {
if (contains(*I)) return true;
}
return false;
OpenPOWER on IntegriCloud