<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 11, 2016 at 11:49 AM, Sebastian Pop <span dir="ltr"><<a href="mailto:sebpop@gmail.com" target="_blank">sebpop@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, Oct 11, 2016 at 12:18 PM, Daniel Berlin <<a href="mailto:dberlin@dberlin.org">dberlin@dberlin.org</a>> wrote:<br>
>> > STH like:<br>
>> ><br>
>> > bool  MemorySSA::defClobbersUse(<wbr>MemoryDef *MD, MemoryUse *MU) {<br>
>> >    return instructionClobbersQuery(MD, MU, MemoryLocOrCall(MU),<br>
>> > MSSA->AA);<br>
>> > }<br>
>> ><br>
>><br>
>> That is not easy:<br>
><br>
><br>
> Can you explain to me why?<br>
> It seems pretty trivial.<br>
><br>
<br>
</span>Yes it is: I'll post an updated patch.<br></blockquote><div><br></div><div>Yeah, i think if you tried to use the *existing interfaces*, that would be hard, as it would require exposing MemoryLocOrCall.</div><div>I think we should just avoiding doing that ;)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sorry about this: I got confused by my previous attempt at fixing this.<br></blockquote><div><br></div><div>Understandable, it wasn't until this morning it danwed on me that there is amuch easier way :)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
>> Also one things is that in my use-case, both instructions would be<br>
>> MemoryDefs,<br>
><br>
><br>
> Err, in this use case, you are looking for loads that blocks stores, so now<br>
> i'm confused.<br>
<br>
</span>We may be moving the store past either a load, a store, or a call.<br></blockquote><div><br></div><div>Ah.</div><div>I *think* it should work, because we pretend aliasing/etc is symmetric, but if not, we can make doesDefClobber or something, and make it do the right thing internal to MemorySSA.</div><div><br></div><div><br></div></div><br></div></div>