<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Oct 9, 2017 at 2:33 PM, Hal Finkel <span dir="ltr"><<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000"><span class="">
<div class="m_-7023385079172652559moz-cite-prefix">On 10/09/2017 03:57 PM, Daniel Berlin
wrote:<br>
</div>
<blockquote type="cite">
<span>FWIW: Bootstrap is probably not a good test of this, there
are bugs filed where we end up with tons of loads and stores to
test against each other. That's actually fairly rare in
bootstrap, as you can see.</span>
<div>Let me get you some test cases.</div>
<div><br>
</div>
<div>My guess is that we should go with mustmod.</div>
</blockquote>
<br></span>
I agree.<br></div></blockquote><div><br></div><div>Ok, will give this approach a shot.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
<br>
-Hal<div><div class="h5"><br>
<br>
<blockquote type="cite">
<div><br>
</div>
<div><br>
</div>
<div>As for callsites, adding mustmod works for call, memloc and
call, call testing.</div>
<div><br>
<br>
<div class="gmail_quote">
<div dir="ltr">On Mon, Oct 9, 2017, 4:48 PM Alina Sbirlea <<a href="mailto:alina.sbirlea@gmail.com" target="_blank">alina.sbirlea@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi,
<div><br>
</div>
<div>This came up in <a href="https://reviews.llvm.org/D38569" target="_blank">https://reviews.llvm.org/<wbr>D38569</a>,
and I'd like some input on what's the best way to get
alias and mod-ref info without having two alias calls.</div>
<div><br>
</div>
<div>A couple of ideas:</div>
<div>(a) Extend the getModRefInfo interface
(+getModRefBehavior, +gerArgModRefInfo) to return a pair
{ModRefInfo, AliasResult}. </div>
<div><br>
</div>
<div>The AliasResult can be optional based on an argument</div>
<div> e.g.:</div>
<div> struct MRI_AR { ModRefInfo MRI, AliasResult AR };</div>
<div> MRI_AR getModRefInfoAlias (LoadInst *LI,
MemoryLocation Loc, bool SetAliasResultField);</div>
<div><br>
</div>
<div>Add wrapper APIs to preserve current calls.<br>
e.g.:<br>
ModRefInfo getModRefInfo (LoadInst *LI,
MemoryLocation Loc) {<br>
return getModRefInfoAlias (LI, Loc,
false).MRI;<br>
}</div>
<div><br>
(b) From talking offline with George, introducing a
MRI_MustMod in ModRefInfo.</div>
<div><br>
</div>
<div><br>
</div>
<div>Open question: How to handle callsites.</div>
<div><br>
</div>
<div><br>
</div>
<div>In terms of whether this is worth doing, as a
preliminary timing test I timed the llvm bootstrap build
with 1 vs 2 alias calls in D38569: <span style="background-color:rgba(151,234,151,0.6);color:rgb(0,0,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap">instructionClobbersQue<wbr>ry:296</span>,
and got the following:</div>
<div>
<div>2 alias calls:</div>
real 62m52.627s<br>
user 2769m46.964s<br>
sys 17m48.072s
<div>1 alias call:</div>
real 62m56.659s<br>
user 2766m40.452s<br>
sys 17m46.312s</div>
<div><br>
</div>
<div>Thoughts?</div>
<div><br>
</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Alina</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
<br>
</div></div><span class="HOEnZb"><font color="#888888"><pre class="m_-7023385079172652559moz-signature" cols="72">--
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
</font></span></div>
</blockquote></div><br></div></div>