Criteria for Inline Function Expansion

For a routine to be considered for inlining, it has to meet certain minimum criteria. There are criteria to be met by the call-site, the caller, and the callee. The call-site is the site of the call to the function that might be inlined. The caller is the function that contains the call-site. The callee is the function being called that might be inlined.

Minimum call-site criteria:

Minimum criteria for the caller:

-Qoptionf,-ip_inline_max_total_stats=new value

Minimum criteria for the callee:

Once these criteria are met, the compiler picks the routines whose in-line expansions will provide the greatest benefit to program performance. This is done using the following default heuristics. When you use profile-guided optimizations, a number of other heuristics are used (see Profile-Guided Optimization (PGO) for more information on profile-guided optimization).