<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></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""> llvmdev-bounces@cs.uiuc.edu [mailto:llvmdev-bounces@cs.uiuc.edu]
<b>On Behalf Of </b>Xinliang David Li<br>
<b>Sent:</b> Monday, October 27, 2014 10:02 PM<br>
<b>To:</b> betulb@codeaurora.org<br>
<b>Cc:</b> llvmdev<br>
<b>Subject:</b> Re: [LLVMdev] Indirect call site profiling<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></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:<o:p></o:p></p>
<p class="MsoNormal"><br>
> On 10/24/14, 8:26 PM, <a href="mailto:betulb@codeaurora.org">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.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">IIRC, gap is another C program benefit from this.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">David<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></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">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><o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>