[PATCH] D48372: [MemorySSAUpdater] Remove deleted trivial Phis from active workset
Alexandros Lamprineas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 21 01:49:13 PDT 2018
labrinea added inline comments.
================
Comment at: lib/Analysis/MemorySSAUpdater.cpp:208
if (Phi) {
+ InsertedPHIs.remove(Phi);
Phi->replaceAllUsesWith(Same);
----------------
efriedma wrote:
> remove on a SmallSetVector is linear time, which might be a problem here.
On a SmallVector we'd have to do a linear lookup and then move the elements around, so it should be the same in terms of complexity. Moreover, I thought it's good to have a guarantee that InsertedPHIs does not contain duplicates. What is the suggestion here?
https://reviews.llvm.org/D48372
More information about the llvm-commits
mailing list