<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Oct 9, 2017 at 1:57 PM, Daniel Berlin <span dir="ltr"><<a href="mailto:dberlin@dberlin.org" target="_blank">dberlin@dberlin.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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></blockquote><div><br></div><div>SG, thanks! </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br></div><div>My guess is that we should go with mustmod.</div><div><br></div><div><br></div><div>As for callsites, adding mustmod works for call, memloc and call, call testing.</div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div> </div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_-2259333034096222757HOEnZb"><div class="m_-2259333034096222757h5"><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/D3856<wbr>9</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>
</div></div></blockquote></div><br></div></div>