<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Thanks Daniel, Sanjoy.<br class="">
<div class=""><br class="">
</div>
<div class="">I’ll be making the changes in the alias analysis getModRefInfo instead of within the MDA. getModRefInfo is used by MDA, so the implications on the various passes (GVN, Memcpyopt and DSE) should be the same, </div>
<div class="">it’s just that the code change will be within the same code region where other special cases exist :)</div>
<div class=""><br class="">
</div>
<div class="">Anna<br class="">
<div class="">
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Aug 5, 2016, at 3:36 PM, Daniel Berlin <<a href="mailto:dberlin@dberlin.org" class="">dberlin@dberlin.org</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="">> That said, in theory:<br class="">
><br class="">
> %a = add 5, 3<br class="">
> bar = invariant.start(foo, 5)<br class="">
> load foo<br class="">
> invariant.end(bar)<br class="">
><br class="">
> to<br class="">
> bar = invariant.start(foo, 5)<br class="">
> %a = add 5, 3<br class="">
> load foo<br class="">
> invariant.end(bar)<br class="">
><br class="">
> is probably also illegal, and has the same issues :)<br class="">
<br class="">
</span>I don't understand why that ^ is a problem.<span class=""><br class="">
<br class="">
</span></blockquote>
<div class=""><br class="">
</div>
<div class="">You have extended the scope :)</div>
<div class=""><br class="">
</div>
<div class="">Even if the extension is not meaningful :)<br class="">
 <br class="">
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="">>     With the memdep changes we will allow reordering loads across the<br class="">
>     invarinat_start call:<br class="">
><br class="">
>        int val = *ptr;<br class="">
>        invariant_start(ptr)<br class="">
><br class="">
>     <==><br class="">
><br class="">
>        int val = *ptr;<br class="">
>        invariant_start(ptr)<br class="">
><br class="">
><br class="">
> (you meant for the first one to have the load after invariant start, i<br class="">
> presume)<br class="">
<br class="">
</span>I meant given what we're teaching MDA, the two are equivalent (hence<br class="">
the "bidirectional arrow" :)).</blockquote>
<div class=""><br class="">
</div>
<div class="">I meant that the examples are identical</div>
<div class=""> :)<br class="">
 <br class="">
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br class="">
<br class="">
> I'm willing to give it a shot if you want, i'm just in the "we'll<br class="">
> probably break something unexpected" camp :)<br class="">
<br class="">
</span>I now think it is better to add one more special case to AliasAnalysis<br class="">
around invariant_start s, like we do for assumes.  It's a hack, but at<br class="">
least a localized hack.</blockquote>
<div class=""><br class="">
</div>
<div class="">I already added the same hack to memoryssa, so i can't complain :)</div>
<div class=""> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888" class=""><br class="">
<br class="">
-- Sanjoy<br class="">
</font></span></blockquote>
</div>
<br class="">
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</body>
</html>