[llvm-commits] [llvm] r123318 - /llvm/trunk/lib/Transforms/Scalar/LoopDeletion.cpp
Devang Patel
dpatel at apple.com
Wed Jan 12 11:12:45 PST 2011
Author: dpatel
Date: Wed Jan 12 13:12:45 2011
New Revision: 123318
URL: http://llvm.org/viewvc/llvm-project?rev=123318&view=rev
Log:
Use SmallVector instead of SmallPtrSet and avoid non-deterministic behavior.
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopDeletion.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopDeletion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopDeletion.cpp?rev=123318&r1=123317&r2=123318&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopDeletion.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopDeletion.cpp Wed Jan 12 13:12:45 2011
@@ -194,13 +194,13 @@
// be deleted from the reference counting scheme.
DominatorTree& DT = getAnalysis<DominatorTree>();
DominanceFrontier* DF = getAnalysisIfAvailable<DominanceFrontier>();
- SmallPtrSet<DomTreeNode*, 8> ChildNodes;
+ SmallVector<DomTreeNode*, 8> ChildNodes;
for (Loop::block_iterator LI = L->block_begin(), LE = L->block_end();
LI != LE; ++LI) {
// Move all of the block's children to be children of the preheader, which
// allows us to remove the domtree entry for the block.
- ChildNodes.insert(DT[*LI]->begin(), DT[*LI]->end());
- for (SmallPtrSet<DomTreeNode*, 8>::iterator DI = ChildNodes.begin(),
+ ChildNodes.insert(ChildNodes.begin(), DT[*LI]->begin(), DT[*LI]->end());
+ for (SmallVector<DomTreeNode*, 8>::iterator DI = ChildNodes.begin(),
DE = ChildNodes.end(); DI != DE; ++DI) {
DT.changeImmediateDominator(*DI, DT[preheader]);
if (DF) DF->changeImmediateDominator((*DI)->getBlock(), preheader, &DT);
More information about the llvm-commits
mailing list