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

bryant via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 30 02:34:05 PDT 2016


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.

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 --------------
A non-text attachment was scrubbed...
Name: D26126.76329.patch
Type: text/x-patch
Size: 6381 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161030/44c91565/attachment.bin>


More information about the llvm-commits mailing list