<div dir="ltr"><div>Hello all,</div><div><br></div>I have update the patch <a href="https://reviews.llvm.org/D33514">https://reviews.llvm.org/D33514</a><div>and <a href="https://reviews.llvm.org/D37196">https://reviews.llvm.org/D37196</a> for bug <a href="https://bugs.llvm.org/show_bug.cgi?id=32352">https://bugs.llvm.org/show_bug.cgi?id=32352</a></div><div>please guide me with reviews.</div><div><br></div><div>Thanks,</div><div>Vivek</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Aug 27, 2017 at 5:52 AM, Adam Nemet <span dir="ltr"><<a href="mailto:anemet@apple.com" target="_blank">anemet@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><div><div class="h5"><blockquote type="cite"><div>On Aug 26, 2017, at 3:20 PM, Davide Italiano <<a href="mailto:davide@freebsd.org" target="_blank">davide@freebsd.org</a>> wrote:</div><br class="m_-5706144275741855578Apple-interchange-newline"><div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">On Sat, Aug 26, 2017 at 3:00 PM, Davide Italiano <</span><a href="mailto:davide@freebsd.org" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">davide@freebsd.org</a><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">> wrote:</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><blockquote type="cite" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">On Fri, Aug 25, 2017 at 6:25 PM, Adam Nemet <<a href="mailto:anemet@apple.com" target="_blank">anemet@apple.com</a>> wrote:<br><blockquote type="cite"><br>On Aug 25, 2017, at 1:11 PM, Davide Italiano <<a href="mailto:davide@freebsd.org" target="_blank">davide@freebsd.org</a>> wrote:<br><br>On Mon, Aug 21, 2017 at 1:00 PM, Haicheng Wu via llvm-commits<br><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br><br>Author: haicheng<br>Date: Mon Aug 21 13:00:09 2017<br>New Revision: 311371<br><br>URL: <a href="http://llvm.org/viewvc/llvm-project?rev=311371&view=rev" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=311371&view=rev</a><br>Log:<br>[InlineCost] Add cl::opt to allow full inline cost to be computed for<br>debugging purposes.<br><br>Currently, the inline cost model will bail once the inline cost exceeds the<br>inline threshold in order to avoid unnecessary compile-time. However, when<br>debugging it is useful to compute the full cost, so this command line option<br>is added to override the default behavior.<br><br>I took over this work from Chad Rosier (<a href="mailto:mcrosier@codeaurora.org" target="_blank">mcrosier@codeaurora.org</a>).<br><br><br>This causes a non-linear increase in the time spent in the inliner for<br>us, even with optimization remarks disabled.<br>real    0m2.889s<br>vs<br>real    0m30.429s<br><br>I'm under the impression the issue is that for the legacy pass manager<br>we create an ORE object on-the-fly (as the inliner is a CGSCC pass,<br>and ORE is a FunctionPass analysis), so ORE is always non-null and we<br>compute the inlineCost in every case. For the new PM, we can rely on<br>proxying, but in the current infrastructure I'm not aware of an easy<br>way of obtaining function passes from outer units of IR.<br>Adam/Chandler, thoughts?<br><br><br>Hi Davide,<br><br>Sorry about the delay.  ORE is always set irrespective of whether remarks<br>are enabled or not regardless whether you use old or new PM.<br><br><br>If nothing comes up, I'm going to pass null instead of ORE in<br>InlineSimple to recover from the hit (the feature will be still<br>available in the new PM, where we have a much better infrastructure<br>for the purpose).<br><br><br>I think that this interface is unfortunate conditionalizing on ORE to emit<br>remarks.<br><br>Also the solution you used from WholeProgDevirt doesn't unfortunately work,<br>see <a href="https://bugs.llvm.org/show_bug.cgi?id=32352" target="_blank">https://bugs.llvm.org/show_<wbr>bug.cgi?id=32352</a> but it’s OK in the short<br>term.<br><br>Vivek has been working on the actual solution for this to correctly define<br>OptimizationRemarkEmitter::<wbr>allowExtraAnalysis.  Vivek, do you think you can<br>get to it soonish?  The API is currently very confusing and I’d like to do<br>something about it.<br><br>Thanks,<br>Adam<br><br><br></blockquote><br>Thanks for your reply, Adam.<br>I'm going to disable the feature until the API is fleshed out.<br><br></blockquote><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Nevermind, ignore my previous reply. What I meant is that I'll leave</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">my workaround in place until the API is fleshed out.</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"></div></blockquote><div><br></div></div></div><div>OK :).</div><br><blockquote type="cite"><div><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Thanks,</span><span class="HOEnZb"><font color="#888888"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">--</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Davide</span></font></span></div></blockquote></div><br></div></blockquote></div><br></div>