[PATCH] D49156: [MemorySSA] Add API to update MemoryPhis, following CFG changes.

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 20 11:17:06 PDT 2018


asbirlea marked an inline comment as done.
asbirlea added inline comments.


================
Comment at: llvm/trunk/include/llvm/Analysis/MemorySSAUpdater.h:133
+  void
+  wireOldPredecessorsToNewImmediatePredecessor(BasicBlock *Old, BasicBlock *New,
+                                               ArrayRef<BasicBlock *> Preds);
----------------
sanjoy wrote:
> I was trying to understand this comment in the context of https://reviews.llvm.org/D45300 and I think it can be improved slightly.  Instead of saying "before" and "point to" we should use more specific "branches to" terminology.  I.e. something like:
> 
> ```
> Old now has New, an empty BasicBlock, branching directly to it, and the predecessors in Preds that used to branch to Old, now branch to New. If New is the only predecessor, move Old's Phi, if present, to New.  Otherwise, add a new Phi in New with appropriate incoming values, and update the incoming values in Old's Phi node too, if present.
> ```
> 
Thanks! Updated in r340192.


Repository:
  rL LLVM

https://reviews.llvm.org/D49156





More information about the llvm-commits mailing list