Interprocedural optimization (IPO) is a collection of compiler
techniques used in computer programming to improve performance
in programs containing many frequently used functions of small
or medium length. IPO differs from other compiler optimization
because it analyzes the entire program; other optimizations look
at only a single function, or even a single block of code. IPO
seeks to reduce or eliminate duplicate calculations, inefficient
use of memory, and to simplify iterative sequences such as
loops. If there is a call to another routine that occurs within
a loop, IPO analysis may determine that it is best to inline
that. Additionally, IPO may re-order the routines for better
memory layout and locality. IPO may also include typical
compiler optimizations on a whole-program level, for example
dead code elimination, which removes code that is never
executed. To accomplish this, the compiler tests for branches
that are never taken and removes the code in that branch. IPO
also tries to ensure better use of c