None.
Attempts to inline functions instead of generating calls to those functions, for improved performance.
>>-+- -qinline-+----------------------------+-+---------------->< | | .-:--------------------. | | | | V | | | | +-=---+-auto-------------+-+-+ | | | +-noauto-----------+ | | | | +-level--=--number-+ | | | | '-autothreshold----' | | | | .-:-------------. | | | | V | | | | '-+- + +----function_name-+--' | | '- - ' | '- -qnoinline------------------------------'
If -qinline is not specified, the default option is -qnoinline at the -O0 or -qnoopt optimization level or -qinline=noauto:level=5 at the -O2 or higher optimization levels.
If -qinline is specified without any suboptions, the default option is -qinline=auto:level=5.
int increment(){
int a, b, i;
for (i=0; i<10; i++){ // statement 1
a=i; // statement 2
b=i; // statement 3
}
}
You can specify -qinline with any optimization level of -O2, -O3, -O4, or -O5 to enable inlining of functions, including those functions that are declared with the inline specifier.
When -qinline is in effect, the compiler determines whether inlining a specific function can improve performance. That is, whether a function is appropriate for inlining is subject to two factors: limits on the number of inlined calls and the amount of code size increase as a result. Therefore, enabling inlining a function does not guarantee that function will be inlined.
Because inlining does not always improve runtime performance, you need to test the effects of this option on your code. Do not attempt to inline recursive or mutually recursive functions.
You can use the -qinline+<function_name> or -qinline-<function_name> option to specify the functions that must be inlined or must not be inlined.
The -qinline-<function_name> option takes higher precedence than the always_inline or __always_inline__ attribute. When you specify both the always_inline or __always_inline__ attribute and the -qinline-<function_name> option to a function, that function is not inlined.
If you specify the -g option to generate debugging information, the inlining effect of -qinline might be suppressed.
If you specify the -qcompact option to avoid optimizations that increase code size, the inlining effect of -qinline might be suppressed.
None.
xlc myprogram.c -O2 -qnoinline
However, if some functions in myprogram.c are specified with the always_inline or __always_inline__ attribute, the -qnoinline option has no effect on these functions and they are still inlined.
-O2 -qinline=auto
-O2 -qinline=auto:level=7
If
automatic inlining is already enabled by default and you want to specify
an inlining level of 7, you enter:-O2 -qinline=level=7
xlc myprogram.c -O2 -qinline+salary:taxes:expenses:benefits
xlc myprogram.c -O2 -qinline-salary:taxes:expenses:benefits
-O2 -qinline=noauto -qinline+salary:taxes:benefits
In
this case, the functions salary, taxes, and benefits are inlined. Besides, functions that
are specified with the always_inline or __always_inline__ attribute or declared
with the inline specifier are also inlined. No other functions are
inlined.-qinline+increase-decrease // invalid
-qinline=level=5+increase // invalid
However, you
can use -qinline separately. For example:-qinline+increase -qinline-decrease -qinline=noauto:level=5