Interprocedural Optimizations Overview

Use -ip (Linux*) or /Qip (Windows*) and -ipo (Linux) or /Qipo (Windows) to enable Interprocedural Optimizations (IPO), which allow the compiler to analyze your code to determine where you can benefit from the optimizations listed in the following tables.

IA-32 and ItaniumŪ-based applications

Optimization

Affected Aspect of Program

Inline function expansion

Calls, jumps, branches and loops

Interprocedural constant propagation

Arguments, global variables and return values

Monitoring module-level static variables

Further optimizations and loop invariant code

Dead code elimination

Code size

Propagation of function characteristics

Call deletion and call movement

Multifile optimization

Same aspects as -ip (Linux) or /Qip (Windows) but across multiple files

IA-32 applications only

Optimization

Affected Aspect of Program

Passing arguments in registers

Calls and register usage

Loop-invariant code motion

Further optimizations and loop invariant code

Inline function expansion is one of the main optimizations performed by the interprocedural optimizer. For function calls that the compiler believes are frequently executed, the compiler may decide to replace the instructions of the call with code for the function itself.

With -ip (Linux) or /Qip (Windows), the compiler performs inline function expansion for calls to procedures defined within the current source file. However, when you use -ipo (Linux) or /Qipo (Windows) to specify multifile IPO, the compiler performs inline function expansion for calls to procedures defined in separate files.

Caution

The -ip and -ipo (Linux) or /Qip and /Qipo (Windows) options can in some cases significantly increase compile time and code size.

-auto-ilp32 (Linux*) or /Qauto-ilp32 (Windows*) for ItaniumŪ-based Systems

On ItaniumŪ-based systems, the -auto-ilp32 (Linux) or /Qauto-ilp32 (Windows) option specifies interprocedural analysis over the whole program. This optimization allows the compiler to use 32-bit pointers whenever possible as long as the application does not exceed a 32-bit address space. Using the -auto-ilp32 (Linux) or /Qauto-ilp32 (Windows) option on programs that exceed 32-bit address space may cause unpredictable results during program execution.

Because this optimization requires interprocedural analysis over the whole program, you must use this option with the -ipo (Linux) or /Qipo (Windows) option.

Note

On IntelŪ EM64T systems, this option has no effect unless -xP or -axP (Linux) or /QxP or /QaxP (Windows) is also specified.