inline_depth

Controls how many passes are used to expand inline function calls.

Syntax
#pragma inline_depth(
  n )
  
#pragma inline_depth(smart)
  
Parameters

n

Sets the number of passes used to expand inline function calls. The number n is an integer from 0 to 1024 or the smart specifier. It also represents the distance allowed in the call chain from the last function up. For example, if d is the total depth of a call chain, then functions below a depth of d-n are inlined if they do not exceed the following size settings:

#pragma inline_max_size(n);
#pragma inline_max_total_size(n);

The first pragma sets the maximum function size to be considered for inlining; the second sets the maximum size to which a function is allowed to grow after the functions it calls are inlined. Here, n is the number of statements, operands, and operators in the function, which turns out to be roughly twice the number of instructions generated by the function. However, this number can vary from function to function. For the inline_max_size pragma, the default value of n is 256; for the inline_max_total_size pragma, the default value of n is 10000.

smart

The smart specifier is the default mode, with four passes where the passes 2-4 are limited to small inline functions. All inlineable functions are expanded if inline_depth is set to 1-1024.

Remarks

The pragmas dont_inline and always_inline override this pragma. This pragma corresponds to the Inline Depth setting in the CodeWarrior IDE's C/C++ Language settings panel. Setting the Inline Depth option to "Do not Inline" in the settings panel will also override this pragma. By default, this pragma is disabled.

Related information
access_errors
always_inline
arg_dep_lookup
ARM_conform
ARM_scoping
array_new_delete
auto_inline
bool
cplusplus
cpp1x
cpp_extensions
debuginline
def_inherited
defer_codegen
defer_defarg_parsing
direct_destruction
direct_to_som
dont_inline
ecplusplus
exceptions
inline_bottom_up
inline_bottom_up_once
inline_max_auto_size
inline_max_size
inline_max_total_size
internal
iso_templates
new_mangler
no_conststringconv
no_static_dtors
nosyminline
old_friend_lookup
old_pods
old_vtable
opt_classresults
parse_func_templ
parse_mfunc_templ
RTTI
suppress_init_code
template_depth
thread_safe_init
warn_hidevirtual
warn_no_explicit_virtual
warn_no_typename
warn_notinlined
warn_structclass
wchar_type