<div dir="ltr">Hi Renato,<div class="gmail_extra"><br><div class="gmail_quote">2015-03-18 19:09 GMT+08:00 Renato Golin <span dir="ltr"><<a href="mailto:renato.golin@linaro.org" target="_blank">renato.golin@linaro.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Jiangning,<br>
<br>
AFAICT, your design considerations are sound and relevant.<br>
<br>
The "ABC problem" seems nasty. Without much thinking, could you use a lazy evaluation by annotating code with metadata stating the current threshold for that particular BB/Loop? If instead of passing through the code multiple times (for ABC and ABD, etc), you could memoize the info in a graph-like metadata, so that you could re-use partial calculations in future inlinings. It may not be worth it, but if reading from this metadata is quicker than re-calculating, that it'd at least be faster. Also, such metadata could (should?) be quickly discarded anyway, as after inlining, the costs will change.<br></blockquote><div><br></div><div>Yeah, agree with you. This is a piece of logic we can improve for compile-time. But essentially I also agree with David, using new pass manager should be able to partially solve the issue.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
About your benchmarks, they're very promising numbers. Taking 3% code-size for 1.5% performance is not a bad choice. Have you tested/benchmarked in other arches? Would be good to know at least on x86_64 and ARM how that goes.<br></blockquote><div><br></div><div>I just checked it on my x86 box, the performance impact of SPEC2000 is +0.85%.</div><div><br></div><div>Thanks,</div><div>-Jiangning</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I'll see if I can run those same tests on ARM, at least.<br>
<br>
cheers,<br>
--renato<br>
<span><br>
<br>
REPOSITORY<br>
  rL LLVM<br>
<br>
<a href="http://reviews.llvm.org/D8408" target="_blank">http://reviews.llvm.org/D8408</a><br>
<br>
</span>EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
</blockquote></div><br></div></div>