mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-09 10:31:14 +00: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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123286 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a518ccc26a
commit
fbbd4abfe5
@ -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