3.4.129 –xinline_param=a[,a[,a]...]
Use this option to manually change the heuristics used by the compiler for deciding when to
inline a function call.
This option only has an effect at -O3 or higher. The following sub-options have an effect only
at -O4 or higher when automatic inlining is on.
In the following sub-options n must be a positive integer;
a can be one of the following:
Table 3-19 -xinline_param Sub-options
|
|
default
|
Set the values of all the sub-options to their default values.
|
max_inst_hard[:n]
|
Automatic inlining only considers functions smaller than n pseudo instructions (counted in
compiler's internal representation) as possible inline candidates.
Under no circumstances will a function larger than this be considered for inlining.
|
max_inst_soft[:n]
|
Set inlined function's size limit to n pseudo instructions (counted
in compiler's internal representation).
Functions of greater size than this may sometimes be inlined.
When interacting with max_inst_hard, the value of
max_inst_soft should be equal to or smaller than the value of
max_inst_hard, i.e, max_inst_soft <=
max_inst_hard.
In general, the compiler's automatic inliner only inlines calls whose called function's size
is smaller than the value of max_inst_soft. In some cases a function may be
inlined when its size is larger than the value of max_inst_soft but smaller than
that of max_inst_hard. An example of this would be if the parameters passed into
a function were constants.
When deciding whether to change the value of max_inst_hard or
max_inst_soft for inlining one specific call site to a function, use
-xinline_report=2 to report detailed inlining message and follow the suggestion
in the inlining message.
|
max_function_inst[:n]
|
Allow functions to increase due to automatic inlining by up to n
pseudo instructions (counted in compiler's internal representation).
|
max_growth[:n]
|
The automatic inliner is allowed to increase the size of the program by up to
n% where the size is measured in pseudo instructions.
|
min_counter[:n]
|
The minimum call site frequency counter as measured by profiling feedback
(-xprofile) in order to consider a function for automatic inlining.
This option is valid only when the application is compiled with profiling feedback
(-xprofile=use).
|
level[:n]
|
Use this suboption to control the degree of automatic inlining that is applied. The compiler
will inline more functions with higher settings for -xinline_param=level.
n must be one of 1, 2, or 3.
The default value of n is 2 when this option is not specified, or
when the options is specified without :n.
Specify the level of automatic inline:
level:1 basic inlining
level:2 medium inlining (default)
level:3 aggressive inlining
The level decides the specified values for the combination of the following
inlining parameters:
max_growth
+ max_function_inst
+ max_inst
+ max_inst_call
When level = 1, all the parameters are half the values of the
default.
When level = 2, all the parameters are the default value.
When level = 3, all the parameters are double the values of the
default.
|
max_recursive_depth[:n]
|
When a function calls itself either directly or indirectly, it is said to be making a
recursive call.
This suboption allows a recursive call to be automatically inlined up to
n levels.
|
max_recursive_inst[:n]
|
Specifies the maximum number of pseudo instructions (counted in compiler's internal
representation) the caller of a recursive function can grow to by performing automatic recursive
inlining.
When interactions between max_recursive_inst and
max_recursive_depth occur, recursive function calls will be inlined until either
the max_recursive_depth number of recursive calls, or until the size of the
function being inlined into exceeds max_recursive_inst. The settings of these two
parameters control the degree of inlining of small recursive functions.
|
|
If -xinline_param=default is specified, the compiler will set all the
values of the subopitons to the default values.
If the option is not specified, the default is
-xinline_param=default.
The list of values and options accumulate from left to right. So for a specification of
-xinline_param=max_inst_hard:30,..,max_inst_hard:50, the value
max_inst_hard:50 will be passed to the compiler.
If multiple -xinline_param options are specified on the command line, the
list of sub-options likewise accumulate from left to right. For example, the effect of
-xinline_param=max_inst_hard:50,min_counter:70 ...
-xinline_param=max_growth:100,max_inst_hard:100
will be the same as that of
-xinline_param=max_inst_hard:100,min_counter:70,max_growth:100