Developer Guide and Reference


Interprocedural Optimization (IPO)

Interprocedural Optimization (IPO) is an automatic, multi-step process that allows the compiler to analyze your code to determine where you can benefit from specific optimizations.
The compiler may apply the following optimizations:
  • Address-taken analysis
  • Array dimension padding
  • Alias analysis
  • Automatic array transposition
  • Automatic memory pool formation
  • C++ class hierarchy analysis
  • Common block variable coalescing
  • Common block splitting
  • Constant propagation
  • Dead call deletion
  • Dead formal argument elimination
  • Dead function elimination
  • Formal parameter alignment analysis
  • Forward substitution
  • Indirect call conversion
  • Inlining
  • Mod/ref analysis
  • Partial dead call elimination
  • Passing arguments in registers to optimize calls and register usage
  • Points-to analysis
  • Routine key-attribute propagation
  • Specialization
  • Stack frame alignment
  • Structure splitting and field reordering
  • Symbol table data promotion
  • Un-referenced variable removal
  • Whole program analysis

IPO Compilation Models

IPO supports two compilation models - single-file compilation and multi-file compilation.
Single-file compilation uses the
compiler option, and results in one, real object file for each source file being compiled. During single-file compilation the compiler performs inline function expansion for calls to procedures defined within the current source file.
The compiler performs some single-file interprocedural optimization at the
default optimization level; additionally the compiler may perform some inlining for the
optimization level, such as inlining functions marked with inlining
pragmas or attributes (GNU C and C++) and C++ class member functions with bodies include