forked from OSchip/llvm-project
Fix a non-deterministic loop in llvm::MergeBlockIntoPredecessor.
DT->changeImmediateDominator() trivially ignores identity updates, so there is really no need for the uniqueing provided by SmallPtrSet. I expect this to fix PR8954. llvm-svn: 123286
This commit is contained in:
parent
8c98495f43
commit
f2407aa98b
|
@ -169,8 +169,8 @@ bool llvm::MergeBlockIntoPredecessor(BasicBlock *BB, Pass *P) {
|
|||
if (DominatorTree *DT = P->getAnalysisIfAvailable<DominatorTree>()) {
|
||||
if (DomTreeNode *DTN = DT->getNode(BB)) {
|
||||
DomTreeNode *PredDTN = DT->getNode(PredBB);
|
||||
SmallPtrSet<DomTreeNode*, 8> Children(DTN->begin(), DTN->end());
|
||||
for (SmallPtrSet<DomTreeNode*, 8>::iterator DI = Children.begin(),
|
||||
SmallVector<DomTreeNode*, 8> Children(DTN->begin(), DTN->end());
|
||||
for (SmallVector<DomTreeNode*, 8>::iterator DI = Children.begin(),
|
||||
DE = Children.end(); DI != DE; ++DI)
|
||||
DT->changeImmediateDominator(*DI, PredDTN);
|
||||
|
||||
|
|
Loading…
Reference in New Issue