forked from OSchip/llvm-project
parent
b5ce11fcc6
commit
4fdf974e3e
|
@ -112,10 +112,8 @@ FoldBlockIntoPredecessor(BasicBlock *BB, LoopInfo *LI, ScalarEvolution *SE,
|
|||
if (DomTreeNode *DTN = DT->getNode(BB)) {
|
||||
DomTreeNode *PredDTN = DT->getNode(OnlyPred);
|
||||
SmallVector<DomTreeNode *, 8> Children(DTN->begin(), DTN->end());
|
||||
for (SmallVectorImpl<DomTreeNode *>::iterator DI = Children.begin(),
|
||||
DE = Children.end();
|
||||
DI != DE; ++DI)
|
||||
DT->changeImmediateDominator(*DI, PredDTN);
|
||||
for (auto DI : Children)
|
||||
DT->changeImmediateDominator(DI, PredDTN);
|
||||
|
||||
DT->eraseNode(BB);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue