<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 30, 2016 at 2:34 AM, bryant <span dir="ltr"><<a href="mailto:3.14472+reviews.llvm.org@gmail.com" target="_blank">3.14472+reviews.llvm.org@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">bryant created this revision.<br>
bryant added reviewers: dberlin, george.burgess.iv.<br>
bryant added a subscriber: llvm-commits.<br>
bryant set the repository for this revision to rL LLVM.<br>
<br>
>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):<br>
<br>
1. getMemoryAccess could only ever return meaningful values when give a BasicBlock or Instruction,<br></blockquote><div><br></div><div>True.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2. createMemoryAccessBefore/After could only ever return nodes for Instructions,<br></blockquote><div><br></div><div>True</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
3. Insertion of a new MemoryUseOrDef could only occur before another MemoryUseOrDef, since MemoryPhis must always come first in a BB's AccessList.<br></blockquote><div><br></div><div><br>This makes it impossible to use it to insert a phi node, of course, but i'm okay with that for the moment.</div><div> <br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
These type changes also have the pleasant side effect of reducing pointer casting verbiage.<br>
<br>
<br></blockquote><div><br></div><div>LGTM </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Repository:<br>
  rL LLVM<br>
<br>
<a href="https://reviews.llvm.org/D26126" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D26126</a><br>
<br>
Files:<br>
  include/llvm/Transforms/Utils/<wbr>MemorySSA.h<br>
  lib/Transforms/Scalar/<wbr>GVNHoist.cpp<br>
  lib/Transforms/Utils/<wbr>MemorySSA.cpp<br>
  unittests/Transforms/Utils/<wbr>MemorySSA.cpp<br>
<br>
</blockquote></div><br></div></div>