[PATCH] D48790: Update MemorySSA in Local utils removing blocks.

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 16 14:12:23 PDT 2018


asbirlea marked 2 inline comments as done.
asbirlea added a comment.

Thank you for the review!



================
Comment at: lib/Transforms/Utils/Local.cpp:2240
+  if (MSSAU)
+    MSSAU->removeBlocks(DeadBlockSet);
+
----------------
NutshellySima wrote:
> We sometimes have BasicBlocks which are pending deletion in the `DomTreeUpdater`. (like that previously in `DeferredDominance`).
> 
> So, sometimes a same BasicBlock can be passed into `MSSAU->removeBlocks` multiple times in different calls to `removeUnreachableBlocks`. You need to be aware of that and check whether it is fine.
I believe that's fine. In MemorySSA, all memory accesses will be deleted for a dead block on the first call, subsequent calls will find an empty list.


Repository:
  rL LLVM

https://reviews.llvm.org/D48790





More information about the llvm-commits mailing list