diff options
author | Chris Lattner <sabre@nondot.org> | 2002-02-12 22:39:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-02-12 22:39:50 +0000 |
commit | 455889aa79e3463a4b0f2161e3d9d72a683268b6 (patch) | |
tree | af1cb8e20b69e33a7a744365fb6e15445abf81ed /lib/Transforms/Scalar/IndVarSimplify.cpp | |
parent | cc179d3ab85fd19c3fd9586409c69d14fbb6c642 (diff) | |
download | external_llvm-455889aa79e3463a4b0f2161e3d9d72a683268b6.tar.gz external_llvm-455889aa79e3463a4b0f2161e3d9d72a683268b6.tar.bz2 external_llvm-455889aa79e3463a4b0f2161e3d9d72a683268b6.zip |
* 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/Transforms/Scalar/IndVarSimplify.cpp')
-rw-r--r-- | lib/Transforms/Scalar/IndVarSimplify.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index 59442ea277..692fcacb7e 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -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); |