<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 30, 2016 at 3:03 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);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>
An invariant of AccessLists is that the defining access of a Use or Def is the nearest preceding Def node.</blockquote><div>False</div><div>This is correct for def's but not for uses.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> For instance, within a BasicBlock:<br>
<br>
  0 = MemoryDef(liveOnEntry)<br>
  1 = MemoryDef(0)<br>
  2 = MemoryUse(n)<br>
  3 = MemoryDef(m)<br>
<br>
1 is the nearest parent Def of 2 and 3, and m and n must be 1.<br></blockquote><div><br></div><div>Given the above, this is incorrect.</div><div>n may be 0</div><div><br></div><div>IE the following is perfectly legal</div><div>  0 = MemoryDef(liveOnEntry)<br>  1 = MemoryDef(0)<br>  2 = MemoryUse(0)<br>  3 = MemoryDef(1)<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
This patch simplifies the interfaces of createMemoryAccessBefore/<wbr>After, and augments them to maintain this invariant.<br>
<br>
Additionally, when inserting a new Def after an existing Def, there is currently no (clean) way to update the users of the old Def to use the new Def. </blockquote><div><br></div><div>RAUW works exactly to do this case.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">So createDefiningAccess now permits the option of updating the users.<br></blockquote><div><br></div><div>Please, no.</div><div><br></div></div></div></div>