<div dir="ltr">povray probably needs both PGO and LTO.<div><br></div><div>David</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 27, 2014 at 9:45 AM, Das, Dibyendu <span dir="ltr"><<a href="mailto:Dibyendu.Das@amd.com" target="_blank">Dibyendu.Das@amd.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">povray in spec cpu 2006 gains if you do indirect function call promotion followed by inlining AFAIK. However, this may require PGO to specialize the top few
 calls.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:llvmdev-bounces@cs.uiuc.edu" target="_blank">llvmdev-bounces@cs.uiuc.edu</a> [mailto:<a href="mailto:llvmdev-bounces@cs.uiuc.edu" target="_blank">llvmdev-bounces@cs.uiuc.edu</a>]
<b>On Behalf Of </b>Xinliang David Li<br>
<b>Sent:</b> Monday, October 27, 2014 10:02 PM<br>
<b>To:</b> <a href="mailto:betulb@codeaurora.org" target="_blank">betulb@codeaurora.org</a><br>
<b>Cc:</b> llvmdev<br>
<b>Subject:</b> Re: [LLVMdev] Indirect call site profiling<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Sun, Oct 26, 2014 at 11:49 AM, <<a href="mailto:betulb@codeaurora.org" target="_blank">betulb@codeaurora.org</a>> wrote:<u></u><u></u></p>
<p class="MsoNormal"><br>
> On 10/24/14, 8:26 PM, <a href="mailto:betulb@codeaurora.org" target="_blank">betulb@codeaurora.org</a> wrote:<br>
>> Hi All,<br>
>><br>
>> We've been working on enhancing LLVM's instrumentation based profiling<br>
>> by<br>
>> adding indirect call target profiling support. Our goal is to add<br>
>> instrumentation around indirect call sites, so that we may track the<br>
>> frequently taken target addresses and their call frequencies.<br>
>><br>
>> The acquired data has uses in optimization of indirect function call<br>
>> heavy applications. Our initial findings show that using the profile<br>
>> data<br>
>> in optimizations would help improve the performance of some of the spec<br>
>> benchmarks notably.<br>
><br>
> Can you quantify "notably?" Also, do you profile on one set of inputs<br>
> and then test the optimization on another set of inputs (e.g., the test<br>
> and train runs)?<br>
<br>
I can't give numbers, but we do collect data from train runs.<br>
<br>
>>   We have a proof of concept implementation,  which we<br>
>> plan to put it up for review. However, I’d like to inquire prior if<br>
>> there<br>
>> are any plans or ongoing work done in the community to enable indirect<br>
>> call target profiling support or not. Please inform if cfe-dev is a<br>
>> better<br>
>> candidate for posting PGO related emails.<br>
><br>
> Interesting. I did not think SPEC had many programs with a lot of<br>
> indirect function calls.<br>
<br>
Spec does have programs such as gcc, vortex and others which use indirect<br>
calls. I'm planning to have an RFC soon on the feature. I'll follow it w/<br>
the patch for the profiler changes for clang, llvm and compiler-rt.<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">IIRC, gap is another C program benefit from this.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">David<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal"><br>
> It would be interesting to see what your optimization would do on an<br>
> operating system kernel like FreeBSD or Linux. The VFS (file system)<br>
> layer uses function pointers a lot, but I'm not sure if it's the<br>
> dominant overhead.<br>
><br>
> Have you tried on C++ programs? They should be making heavy use of<br>
> indirect function calls as well.<br>
><br>
> If you make your software public, please let me know. Adapting your work<br>
> for kernel execution and trying it out on a kernel might be a nice<br>
> project for one of our students.<br>
><br>
> Regards,<br>
><br>
> John Criswell<br>
><br>
> --<br>
> John Criswell<br>
> Assistant Professor<br>
> Department of Computer Science, University of Rochester<br>
> <a href="http://www.cs.rochester.edu/u/criswell" target="_blank">http://www.cs.rochester.edu/u/criswell</a><br>
><br>
><br>
<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><u></u><u></u></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div></div></div>
</div>

</blockquote></div><br></div>