[LLVMdev] Indirect call site profiling
Das, Dibyendu
Dibyendu.Das at amd.com
Mon Oct 27 09:45:38 PDT 2014
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.
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Xinliang David Li
Sent: Monday, October 27, 2014 10:02 PM
To: betulb at codeaurora.org
Cc: llvmdev
Subject: Re: [LLVMdev] Indirect call site profiling
On Sun, Oct 26, 2014 at 11:49 AM, <betulb at codeaurora.org<mailto:betulb at codeaurora.org>> wrote:
> On 10/24/14, 8:26 PM, betulb at codeaurora.org<mailto:betulb at codeaurora.org> wrote:
>> Hi All,
>>
>> We've been working on enhancing LLVM's instrumentation based profiling
>> by
>> adding indirect call target profiling support. Our goal is to add
>> instrumentation around indirect call sites, so that we may track the
>> frequently taken target addresses and their call frequencies.
>>
>> The acquired data has uses in optimization of indirect function call
>> heavy applications. Our initial findings show that using the profile
>> data
>> in optimizations would help improve the performance of some of the spec
>> benchmarks notably.
>
> Can you quantify "notably?" Also, do you profile on one set of inputs
> and then test the optimization on another set of inputs (e.g., the test
> and train runs)?
I can't give numbers, but we do collect data from train runs.
>> We have a proof of concept implementation, which we
>> plan to put it up for review. However, I’d like to inquire prior if
>> there
>> are any plans or ongoing work done in the community to enable indirect
>> call target profiling support or not. Please inform if cfe-dev is a
>> better
>> candidate for posting PGO related emails.
>
> Interesting. I did not think SPEC had many programs with a lot of
> indirect function calls.
Spec does have programs such as gcc, vortex and others which use indirect
calls. I'm planning to have an RFC soon on the feature. I'll follow it w/
the patch for the profiler changes for clang, llvm and compiler-rt.
IIRC, gap is another C program benefit from this.
David
> It would be interesting to see what your optimization would do on an
> operating system kernel like FreeBSD or Linux. The VFS (file system)
> layer uses function pointers a lot, but I'm not sure if it's the
> dominant overhead.
>
> Have you tried on C++ programs? They should be making heavy use of
> indirect function calls as well.
>
> If you make your software public, please let me know. Adapting your work
> for kernel execution and trying it out on a kernel might be a nice
> project for one of our students.
>
> Regards,
>
> John Criswell
>
> --
> John Criswell
> Assistant Professor
> Department of Computer Science, University of Rochester
> http://www.cs.rochester.edu/u/criswell
>
>
_______________________________________________
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu<mailto:LLVMdev at cs.uiuc.edu> http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141027/608651fe/attachment.html>
More information about the llvm-dev
mailing list