The depth of inlining explains how many levels of function calls the compiler will inline. The Inline Depth setting in the IDE's Properties > C/C++ Build > Settings > Tool Settings > PowerPC Compiler > C/C++ Language panel and the inline_depth pragma control inlining depth.
Normally, the compiler only inlines an eligible function if it has already translated the function's definition. In other words, if an eligible function has not yet been compiled, the compiler has no object code to insert. To overcome this limitation, the compiler can perform interprocedural analysis (IPA) either in file or program mode. This lets the compiler evaluate all the functions in a file or even the entire program before inlining the code. The IPA setting in the IDE's C/C++ Language panel and the ipa pragma control this capability.
The compiler normally inlines functions from the first function in a chain of function calls to the last function called. Alternately, the compiler may inline functions from the last function called to the first function in a chain of function calls. The Bottom-up Inlining option in the IDE's C/C++ Language panel and the inline_bottom_up and inline_bottom_up_once pragmas control this reverse method of inlining.
Some functions that have not been defined with the inline , __inline__ , or __inline keywords may still be good candidates to be inlined. Automatic inlining allows the compiler to inline these functions in addition to the functions that you explicitly specify as eligible for inlining. The Auto-Inline option in the IDE's C/C++ Language panel and the auto_inline pragma control this capability.
When inlining, the compiler calculates the complexity of a function by counting the number of statements, operands, and operations in a function to determine whether or not to inline an eligible function. The compiler does not inline functions that exceed a maximum complexity. The compiler uses three settings to control the extent of inlined functions:
The inline_max_auto_size , inline_max_size , and inline_max_total_size pragmas control these thresholds, respectively.