[PATCH] D64601: [MemorySSA] Use SetVector to avoid nondeterminism.
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 11 15:45:12 PDT 2019
dblaikie added a comment.
In D64601#1581770 <https://reviews.llvm.org/D64601#1581770>, @asbirlea wrote:
> > You can use SetVector's "getArrayRef" and pass it as "void removeBlocks(ArrayRef<BasicBlock *> DeadBlocks);"
>
> `removeBlocks` is querying DeadBlocks with `count(...)`. I can change the code to walk the Vector/ArrayRef, but it defeats the purpose of building a set.
> It may be ok to change all callsites to just use vector too, assuming the normal expected size is small, but it may be costly for pathological cases (large number of deadblocks).
> If folks have a preference either way, please let me know.
Oh, sorry, I didn't look too closely & thought it was only iterating over the container.
Yeah, I'd just leave it the way you had it with the 8 in there.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64601/new/
https://reviews.llvm.org/D64601
More information about the llvm-commits
mailing list