[PATCH] D47022: Update MemorySSA in SimpleLoopUnswitch.
Alina Sbirlea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 4 06:04:52 PST 2018
asbirlea marked an inline comment as done.
asbirlea added inline comments.
================
Comment at: lib/Transforms/Scalar/SimpleLoopUnswitch.cpp:1437-1442
+ // Remove all MemorySSA in the dead blocks
+ if (MSSAU) {
+ SmallPtrSet<BasicBlock *, 16> DeadBlockSet(DeadBlocks.begin(),
+ DeadBlocks.end());
+ MSSAU->removeBlocks(DeadBlockSet);
+ }
----------------
chandlerc wrote:
> It would be really nice to avoid building the set here. Can the API be changed to support a list of unique blocks? We already have uniqued them.
>
> (Happy for this to be a follow-up of course.)
The implementation of removeBlocks checks existence of a basic block in this list(`.count(BB)`), and I think that's best done with a set. So not sure if we can avoid building the set anyway.
I can push the set creation in an API (i.e. a wrapper taking a list and building the set).
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D47022/new/
https://reviews.llvm.org/D47022
More information about the llvm-commits
mailing list