diff options
author | Devang Patel <dpatel@apple.com> | 2011-01-12 19:12:45 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-01-12 19:12:45 +0000 |
commit | 85bbd576ea3078a7cd9d8a17228f4c2dce35be2c (patch) | |
tree | 5f6588f18b419a6e5651b8e13912c0e67875873e /lib/Transforms/Scalar/LoopDeletion.cpp | |
parent | 5f8a917b6558f8fdf31b4a6fa591b396e16b9ff2 (diff) |
Use SmallVector instead of SmallPtrSet and avoid non-deterministic behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123318 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopDeletion.cpp')
-rw-r--r-- | lib/Transforms/Scalar/LoopDeletion.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/Scalar/LoopDeletion.cpp b/lib/Transforms/Scalar/LoopDeletion.cpp index eddad3e426..b60f0c38bb 100644 --- a/lib/Transforms/Scalar/LoopDeletion.cpp +++ b/lib/Transforms/Scalar/LoopDeletion.cpp @@ -194,13 +194,13 @@ bool LoopDeletion::runOnLoop(Loop* L, LPPassManager& LPM) { // 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); |