* 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
This commit is contained in:
Chris Lattner
2002-02-12 22:39:50 +00:00
parent cc179d3ab8
commit 455889aa79
21 changed files with 95 additions and 95 deletions
+4 -3
View File
@@ -13,6 +13,7 @@
#include "llvm/Type.h"
#include "llvm/BasicBlock.h"
#include "llvm/ConstantVals.h"
#include "llvm/Support/CFG.h"
#include "Support/STLExtras.h"
#if 0
@@ -87,8 +88,8 @@ static bool TransformLoop(cfg::LoopInfo *Loops, cfg::Loop *Loop) {
// Figure out which block is incoming and which is the backedge for the loop
BasicBlock *Incoming, *BackEdgeBlock;
BasicBlock::pred_iterator PI = Header->pred_begin();
assert(PI != Header->pred_end() && "Loop headers should have 2 preds!");
pred_iterator PI = pred_begin(Header);
assert(PI != pred_end(Header) && "Loop headers should have 2 preds!");
if (Loop->contains(*PI)) { // First pred is back edge...
BackEdgeBlock = *PI++;
Incoming = *PI++;
@@ -96,7 +97,7 @@ static bool TransformLoop(cfg::LoopInfo *Loops, cfg::Loop *Loop) {
Incoming = *PI++;
BackEdgeBlock = *PI++;
}
assert(PI == Header->pred_end() && "Loop headers should have 2 preds!");
assert(PI == pred_end(Header) && "Loop headers should have 2 preds!");
// Add incoming values for the PHI node...
PN->addIncoming(Constant::getNullConstant(Type::UIntTy), Incoming);