[LLVMdev] RFC - Profile Guided Optimization in LLVM

Krzysztof Parzyszek kparzysz at codeaurora.org
Fri Jun 14 10:56:00 PDT 2013


On 6/12/2013 4:55 PM, Jakob Stoklund Olesen wrote:
>
> It seems like we might need a way of representing call graph profiling in addition to the existing branch probabilities?
>

Metadata on function definitions/declarations perhaps?

I agree---the call graph profiling is of critical importance.  I guess 
we should first see what types of data we already know may be useful and 
see how we would represent them within the compiler.

Here's my list (in addition to the usual data gathered in such cases):

* Function call frequency:
   - How many times a function has been called?

* Function argument value profiling:
   - Is the function called with a small set of values for the parameters?
   - Is there any value that is particularly frequent for any of the 
arguments?
   - If the function takes pointers, are the pointers usually aligned?
   - If the function takes pointers, are they aliased?
   - etc.

* Branch profiling:
   - Is the branch executed (i.e. taken/not-taken) in the same way as 
the last time, or does it often change direction?

* Path profiling:
   - Correlation between branches, function calls, etc.


-Krzysztof


-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation



More information about the llvm-dev mailing list