None.
Attempts to inline functions instead of generating calls to those functions, for improved performance.
Specifying -qinline enables automatic inlining by the compiler front end. Specifying -qinline with -O provides additional inlining by enabling inlining by the low-level optimizer. In both cases, the compiler attempts to inline all functions, in addition to those defined inside a class declaration or explicitly marked with the inline specifier.
You must specify a minimum optimization level of -O2 along with -qinline to enable inlining of functions, including those declared with the inline specifier. You can also use the -qinline option to specify restrictions on the functions that should or should not be inlined.
In all cases where -qinline is in effect, the compiler uses heuristics to determine whether inlining a specific function will result in a performance benefit. That is, whether a function is appropriate for inlining is subject to limits on the number of inlined calls and the amount of code size increase as a result. Therefore, simply enabling inlining does not guarantee that a given function will be inlined.
Specifying -qnoinline disables all inlining, including that performed by the high-level optimizer with the -qipa option, and functions declared explicitly as inline.
.- -qnoinline------------------------------. >>-+- -qinline-+----------------------------+-+---------------->< | .-:--------------------. | | V .-auto-------------. | | +-=---+-noauto-----------+-+-+ | +-level--=--number-+ | | '-autothreshold----' | | .-:-------------. | | V | | '-+- + +----function_name-+--' '- - '
increment() { int a, b, i; for (i=0; i<10; i++) /* statement 1 */ { a=i; /* statement 2 */ b=i; /* statement 3 */ } }
To maximize inlining, specify optimization (-O) and also specify the appropriate -qinline options.
Because inlining does not always improve runtime performance, you should test the effects of this option on your code. Do not attempt to inline recursive or mutually recursive functions.
If you specify the -g option to generate debug information, inlining may be suppressed.
None.
xlc myprogram.c -O2 -qnoinline
xlc myprogram.c -O2 -qinline+salary:taxes:expenses:benefits
xlc myprogram.c -O2 -qinline-salary:taxes:expenses:benefits
-O2 -qinline=noauto -qinline+salary:taxes:benefitsThis causes only the functions named salary, taxes, or benefits to be inlined, if possible, and no others.
-O2 -qinline=auto
-O2 -qinline=auto:level=7If automatic inlining is already enabled by default and you want to specify an inlining level (For example: 7), you enter:
-O2 -qinline=level=7