Inline Expansion of Functions
- Removing the need to set up parameters for a function call
- Eliminating the function call branch
- Propagating constants
Selecting Routines for Inlining
- The default heuristic focuses on the most frequently executed call sites, based on the profile information gathered for the program.
- The default heuristic always inlines very small functions that meet the minimum inline criteria.
Inline Expansion of Library Functions
Inlining and Function Preemption (Linux)
Compiler Directed Inline Expansion of Functions
Disables inlining for intrinsic functions. Disables the by-name recognition support of intrinsic functions and the resulting optimizations. Use this option if you redefine standard library routines with your own version and your version of the routine has the same name as the standard library routine.
By default, the compiler automatically inlines (expands) a number of standard and math library functions at the point of the call to that function, which usually results in faster computation.
Many routines in the
svmllibrary are more highly optimized for Intel microprocessors than for non-Intel microprocessors.
Indicates that the source position information for an inlined function should be retained, rather than replaced, by that of the call which is being inlined.
Developer Directed Inline Expansion of User Functions
- Inlining keywords:Tells the compiler to inline the specified function. For example,__inline,__forceinline.
- Procedure-specific inliningTells the compiler to inline calls within the targeted procedure if it is legal to do so. For example,pragmas:.#pragma inlineor#pragma forceinline
- GCC function attributes for inlining:Tells the compiler to inline the function even when no optimization level is specified. For example,__attribute__((always_inline)).