Function inlining can improve execution time by removing the runtime overhead of function calls; however, function inlining can increase code size, code complexity, and compile times. In general, when you instruct the compiler to perform function inlining, the compiler examines the source code in a much larger context, and the compiler can find more opportunities to apply optimizations.
The Inlining Report is part of the Opt Report. The compiler options
/Qopt-report(Windows*) generate optimization reports with different levels of detail. Related compiler options, listed under Optimization Report Options, allow you to specify the phase, direct output to a specific file,
stderr, and request reports from all routines with names containing a specific string as part of their name.
The inlining report is a description of the inlining choices that were made for each routine that is compiled in the program. It is produced as part of the opt report. To restrict the opt report to contain ONLY the inlining report, use the option
The user can control the amount of information by specifying a level for the inlining report. The level is shown by a number from 1 to 5. Level 1 contains the smallest amount of information, and each level adds information to the report. Level 2 is the default report.
Shows each call that was inlined
Level 2 (default report)
Shows the values of the key inlining options
Shows the calls to routines with external linkage
Shows inlining footnotes, which contain advice on how to change the inlining to potentially improve application performance
The inlining report gives you an in-depth overview of the compiler's inlining decisions, which occur within five levels of granularity. You can specify levels with -
-qopt-report=2, etc., (Linux* and
/Qopt-report=2, etc. (Windows*). See below for specific level details.
The Inlining Report is activated when you run the Optimization Report, using
[q or Q]qopt-report.
For each routine you compile, you get one report with the title INLINE REPORT that shows the calls inlined into that routine.
Example: Inlining Report Level 1 - Typical Routine
The report gives the name of the compiled routine (APPLU), and contains one line for each call that the compiler decided to inline or not inline. In the above report, the compiler made 15 inlining decisions for calls in the routine APPLU. It decided to inline 12 of the calls. These decisions are indicated by the lines which start with
-> INLINE. It decided not to inline three of the calls. These decisions are indicated by the lines without the word INLINE.
On each line, the position of the call in the source code is given in parentheses, followed by the name of the routine being called. For example:
-> INLINE: (398,18) EXACT
This refers to a call at line 398 column 18 to a routine called EXACT.
Level 2 includes the values of important compiler options related to inlining.
Unless the user specifies one of these values by using the option on the command line, the default value of the option in shown.You can read more about the meaning of the individual inlining options in the Inlining Options section.
Example: Inlining Report Level 2 - Values of Inlining Options
Level 3 contains one additional line for each call to an external routine made in the application. Such calls are not candidates for inlining, because the code for these routines is not present in the file or files being compiled.
Example: Inlining Report Level 3 - External Linkage
Level 4 adds four additional pieces of information. The specifics are shown below:
- Whole Program values:Example: Whole ProgramWHOLE PROGRAM [SAFE] [EITHER METHOD]: false WHOLE PROGRAM [SEEN] [TABLE METHOD]: true WHOLE PROGRAM [READ] [OBJECT READER METHOD]: falseAn application for which whole program is determined is subject to a higher degree of optimization than one which is not. The Intel compiler uses two methods of determining whole program, a TABLE METHOD and an OBJECT READER METHOD.
- The size of the routine [sz] and the inlined size of the routine [isz]. Usually isz is less than sz:Example: Size of the Routine (sz) vs. Inlined Size of the Routine (isz)-> INLINE: (295,12) SETBV (isz = 752) (sz = 755) -> INLINE: (398,18) EXACT (isz = 98) (sz = 109)In the above example, the routine SETBV was inlined into the routine that called it. The size of SETBV, before inlining, was 755 units. After inlining, the calling routine was increased by 752 units. The increase in the size of the calling routine is slightly less than the size of SETBV, because some of the overhead of calling SETBV was removed when SETBV was inlined.
- The percentage of time that has passed in the process of compiling the file:Example: Percentage of Time Passed During CompilationINLINE REPORT: (APPLU) [1/16=6.2%] applu.f (1,16)For example, on the line above, [1/16 = 6.2%] indicates that APPLU is the first routine out of 16 to be compiled, and when this routine is done being compiled, 6.2% of the compilation is finished. You can use