[PATCH] D68659: [MemorySSA] Make the use of moveAllAfterMergeBlocks consistent.

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 9 08:53:57 PDT 2019


asbirlea added inline comments.


================
Comment at: lib/Analysis/MemorySSAUpdater.cpp:1186
+  if (Defs && Defs->begin() != Defs->end())
+    if (auto *Phi = dyn_cast<MemoryPhi>(&*Defs->begin()))
+      tryRemoveTrivialPhi(Phi);
----------------
george.burgess.iv wrote:
> If I'm reading the description properly, this function assumes that everything in `From` is now in `To`, no?
> 
> If so, `cast<MemoryPhi>()` seems more appropriate here, since the only thing that can remain is a single Phi
This method (`moveAllAccesses`) is also called from `moveAllAfterSpliceBlocks`, when `From` is not necessarily empty. I'll update the comment above.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68659/new/

https://reviews.llvm.org/D68659





More information about the llvm-commits mailing list