mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 05:22:04 +00:00
* 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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user