mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
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
d7a523358c
commit
37fe53c1a9
@ -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
Block a user