[LLVMdev] Capabilities of Clang's PGO (e.g. improving code density)

Lee Hunt leehu at exchange.microsoft.com
Tue May 26 20:47:10 PDT 2015


Hello -

I'm an Engineer in Microsoft Office after looking into possible advantages of using PGO for our Android Applications.

We at Microsoft have deep experience with Visual C++'s Profile Guided Optimization<https://msdn.microsoft.com/en-us/library/e7k32f4k.aspx> and often see 10% or more reduction in the size of application code loaded after using PGO for key scenarios (e.g. application launch).   Making application launch quickly is very important to us, and reducing the number of code pages loaded helps with this goal.

Before we dig into turning it on, I'm wondering if there's any pre-existing research / case studies about possible code page reduction seen from other Clang PGO-enabled applications?  It sounds like there is some possible instrumented run performance problems due to counter contention resulting in sluggish performance and perhaps skewed profile data: https://groups.google.com/forum/#!topic/llvm-dev/cDqYgnxNEhY.  I'd like an overview of the optimizations that PGO does, but I don't find much from looking at the Clang PGO section: http://clang.llvm.org/docs/UsersManual.html#profile-guided-optimization.

For example, from reading different pages on how Clang PGO, it's unclear if it does "block reordering" (i.e. moving unexecuted code blocks to a distant code page, leaving only 'hot' executed code packed together for greater code density).  I find mention of "hot arc" optimization (-fprofile-arcs) , but I'm unclear if this is the same thing.  Does Clang PGO do block reordering?

Thanks,
--Lee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150527/19e91910/attachment.html>


More information about the llvm-dev mailing list