<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2016-01-04 23:28 GMT+01:00 Philip Reames <span dir="ltr"><<a href="mailto:listmail@philipreames.com" target="_blank">listmail@philipreames.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"><span class="">
<br>
<br>
<div>On 01/04/2016 09:55 AM, Amaury SECHET
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr"><br>
<div class="gmail_extra"><br>
<div class="gmail_quote">2016-01-04 18:21 GMT+01:00 Philip
Reames <span dir="ltr"><<a href="mailto:listmail@philipreames.com" target="_blank">listmail@philipreames.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"><span>
<div>On 01/04/2016 07:32 AM, Amaury SECHET wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>
<div>After a bit more investigation, it turns
out that because %0 is stored into %1 (after
bitcast) and so %3 may have access to it and
clobber it.<br>
</div>
</div>
</div>
</blockquote>
</span> Can you give a bit more context? I'm not sure
which of the examples you're talking about.<br>
<br>
</div>
</blockquote>
<div><br>
</div>
<div>Sure. Let's look at <a href="http://pastebin.com/K0J9yGq1" target="_blank">http://pastebin.com/K0J9yGq1</a><br>
<br>
</div>
<div>Because of the store line 7, it is assumed that the
call line 8 may see %0 and even modify the memory it
points to. As a result, it is assumed that the load line
11 may not be eliminated.<br>
<br>
</div>
<div>Which seems actually correct in the general case.<br>
</div>
</div>
</div>
</div>
</blockquote></span>
This seems like a restatement of what I said in my original
response:<span class=""><br>
"You have to teach the alias analysis that an unescaped noalias
pointer can't alias the global state allocmemory might access.
Slightly surprised we don't get this today, but oh well. "<br>
<br></span>
Or am I missing something?<span class=""><br></span></div></blockquote><div><br></div><div>No, you are not missing anything. I was simply able to confirm this by dumping the guts of GVN.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""></span>
<br>
<div text="#000000" bgcolor="#FFFFFF"><span class=""><blockquote type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div>It doesn't look like it is necessary to have it when
the function may be exposed depending on the way the
software is built.<br>
</div>
</div>
</div>
</div>
</blockquote></span>
Er, not sure what you meant here. <br><span class="HOEnZb"><font color="#888888">
<br>
</font></span></div>
</blockquote></div><br></div><div class="gmail_extra">I'm afraid that, depending on the way the software is built, you may end up with a function marked as not accessing any visible memory can end up modifying visible memory after modules are merged. I think this is the kind of thing that may be exposed by LTO (I may be wrong on that one), this is also something that can be exposed by languages like D, where people are going to compile by D module, D packages or the whole program at once.<br></div><div class="gmail_extra"><br></div></div>