Interprocedural Optimizations (IPO)

Use -ip and -ipo to enable interprocedural optimizations (IPO), which allow the compiler to analyze your code to determine where you can benefit from the optimizations listed in tables that follow.

IA-32 and Itanium(TM)-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, loop invariant code
dead code elimination code size
propagation of function characteristics call deletion and call movement
multifile optimization affects the same aspects as -ip, but across multiple files

 IA-32 applications only

Optimization Affected Aspect of Program
passing arguments in registers calls, register usage
loop-invariant code motion further optimizations, 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 might decide to replace the instructions of the call with code for the function itself.

With -ip, the compiler performs inline function expansion for calls to procedures defined within the current source file. However, when you use -ipo to specify multifile IPO, the compiler performs inline function expansion for calls to procedures defined in separate files.

The IPO optimizations are disabled by default.