[LLVMdev] RFC - Profile Guided Optimization in LLVM

Mark Lacey mark.lacey at apple.com
Fri Jun 14 12:10:44 PDT 2013


On Jun 14, 2013, at 10:56 AM, Krzysztof Parzyszek <kparzysz at codeaurora.org> wrote:
> 
> * 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.

More generally it can be useful to collect value data for things like:
- switch values, in order to split off one or more dominant values for an explicit check prior to a table look-up or binary-search through all the cases
- function pointers, to make it possible to explicitly check against a very common pointer value so that the generated code can do a direct call to, or inline, the specific function (including virtual functions)

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

If interprocedural path profiling information is gathered, that should also be usable as a source for generating context-sensitive call graph profile data.




More information about the llvm-dev mailing list