// Since the value is live into BB, it is either defined in a predecessor or
// live into it to. Add the preds to the worklist unless they are a
// defining block.
- for (BasicBlock *P : predecessors(BB)) {
+ for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI) {
+ BasicBlock *P = *PI;
+
// The value is not live into a predecessor if it defines the value.
if (DefBlocks.count(P))
continue;
DomTreeNode *Node = Worklist.pop_back_val();
BasicBlock *BB = Node->getBlock();
- for (BasicBlock *Succ : successors(BB)) {
- DomTreeNode *SuccNode = DT.getNode(Succ);
+ for (succ_iterator SI = succ_begin(BB), SE = succ_end(BB); SI != SE;
+ ++SI) {
+ DomTreeNode *SuccNode = DT.getNode(*SI);
// Quickly skip all CFG edges that are also dominator tree edges instead
// of catching them below.