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

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 18 12:22:05 PDT 2018


sanjoy added inline comments.


================
Comment at: llvm/trunk/include/llvm/Analysis/MemorySSAUpdater.h:133
+  void
+  wireOldPredecessorsToNewImmediatePredecessor(BasicBlock *Old, BasicBlock *New,
+                                               ArrayRef<BasicBlock *> Preds);
----------------
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.
```



Repository:
  rL LLVM

https://reviews.llvm.org/D49156





More information about the llvm-commits mailing list