summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
diff options
context:
space:
mode:
authorAlina Sbirlea <asbirlea@google.com>2019-07-12 22:30:30 +0000
committerAlina Sbirlea <asbirlea@google.com>2019-07-12 22:30:30 +0000
commitdb101864bdc938deb1d63fe4f7da761bd38e5cae (patch)
treee9fdaa69deccd3739d799943624291a5400c80d9 /llvm/lib/Transforms/Utils
parent9178b10163f758cbf8a5290ea6a827990427ddc0 (diff)
downloadbcm5719-llvm-db101864bdc938deb1d63fe4f7da761bd38e5cae.tar.gz
bcm5719-llvm-db101864bdc938deb1d63fe4f7da761bd38e5cae.zip
[MemorySSA] Use SetVector to avoid nondeterminism.
Summary: Use a SetVector for DeadBlockSet. Resolves PR42574. Reviewers: george.burgess.iv, uabelho, dblaikie Subscribers: jlebar, Prazek, mgrang, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64601 llvm-svn: 365970
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-rw-r--r--llvm/lib/Transforms/Utils/Local.cpp2
-rw-r--r--llvm/lib/Transforms/Utils/LoopSimplify.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index 91d33cb0f20..39b6b889f91 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/lib/Transforms/Utils/Local.cpp
@@ -2238,7 +2238,7 @@ bool llvm::removeUnreachableBlocks(Function &F, LazyValueInfo *LVI,
assert(Reachable.size() < F.size());
NumRemoved += F.size()-Reachable.size();
- SmallPtrSet<BasicBlock *, 16> DeadBlockSet;
+ SmallSetVector<BasicBlock *, 8> DeadBlockSet;
for (Function::iterator I = ++F.begin(), E = F.end(); I != E; ++I) {
auto *BB = &*I;
if (Reachable.count(BB))
diff --git a/llvm/lib/Transforms/Utils/LoopSimplify.cpp b/llvm/lib/Transforms/Utils/LoopSimplify.cpp
index 5ec12aafff0..7e6da02d570 100644
--- a/llvm/lib/Transforms/Utils/LoopSimplify.cpp
+++ b/llvm/lib/Transforms/Utils/LoopSimplify.cpp
@@ -681,7 +681,8 @@ ReprocessLoop:
}
DT->eraseNode(ExitingBlock);
if (MSSAU) {
- SmallPtrSet<BasicBlock *, 1> ExitBlockSet{ExitingBlock};
+ SmallSetVector<BasicBlock *, 8> ExitBlockSet;
+ ExitBlockSet.insert(ExitingBlock);
MSSAU->removeBlocks(ExitBlockSet);
}
OpenPOWER on IntegriCloud