[llvm-commits] [llvm] r123286 - /llvm/trunk/lib/Transforms/Utils/BasicBlockUtils.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Tue Jan 11 14:54:38 PST 2011
Author: stoklund
Date: Tue Jan 11 16:54:38 2011
New Revision: 123286
URL: http://llvm.org/viewvc/llvm-project?rev=123286&view=rev
Log:
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.
Modified:
llvm/trunk/lib/Transforms/Utils/BasicBlockUtils.cpp
Modified: llvm/trunk/lib/Transforms/Utils/BasicBlockUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/BasicBlockUtils.cpp?rev=123286&r1=123285&r2=123286&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/BasicBlockUtils.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/BasicBlockUtils.cpp Tue Jan 11 16:54:38 2011
@@ -169,8 +169,8 @@
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);
More information about the llvm-commits
mailing list