[PATCH] D26126: [MemorySSA] Tighten up API type signatures.

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 30 11:02:45 PDT 2016

On Sun, Oct 30, 2016 at 2:34 AM, bryant <3.14472+reviews.llvm.org at gmail.com>

> bryant created this revision.
> bryant added reviewers: dberlin, george.burgess.iv.
> bryant added a subscriber: llvm-commits.
> bryant set the repository for this revision to rL LLVM.
> From what I understand, MSSA nodes are either MemoryPhis (which must only
> be associated with BasicBlocks), or MemoryUseOrDef (which must only be
> associated Instructions). Assuming that this invariant would not change in
> the future (which could easily not be the case if, for instance, there is
> desire for additional MSSA node types):
> 1. getMemoryAccess could only ever return meaningful values when give a
> BasicBlock or Instruction,


> 2. createMemoryAccessBefore/After could only ever return nodes for
> Instructions,


> 3. Insertion of a new MemoryUseOrDef could only occur before another
> MemoryUseOrDef, since MemoryPhis must always come first in a BB's
> AccessList.

This makes it impossible to use it to insert a phi node, of course, but i'm
okay with that for the moment.

> These type changes also have the pleasant side effect of reducing pointer
> casting verbiage.

> Repository:
>   rL LLVM
> https://reviews.llvm.org/D26126
> Files:
>   include/llvm/Transforms/Utils/MemorySSA.h
>   lib/Transforms/Scalar/GVNHoist.cpp
>   lib/Transforms/Utils/MemorySSA.cpp
>   unittests/Transforms/Utils/MemorySSA.cpp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161030/a446e557/attachment.html>

More information about the llvm-commits mailing list