Optimizing at level 4

Benefits at level 4

Optimizing at -O4 builds on -O3 by triggering -qipa=level=1 which performs interprocedural analysis (IPA), optimizing your entire application as a unit. This option is particularly pertinent to applications that contain a large number of frequently used routines.

To make full use of IPA optimizations, you must specify -O4 on the compilation and link steps of your application build as interprocedural analysis occurs in stages at both compile and link time.

Potential trade-offs at level 4

In addition to the trade-offs already mentioned for -O3, specifying -qipa can significantly increase compilation time, especially at the link step.