The xlc utility optimization option levels
You can use the xlc utility options to specify five base optimization levels, which map to the z/OS® batch options as follows:
- -O0 or NOOPT, almost no optimization, best for getting the most debugging information
- -O2 or OPTIMIZE(2), strong low-level optimization that benefits most programs
- -O3 or OPTIMIZE(3), intense low-level optimization analysis
- -O4 or OPTIMIZE(3), HOT, IPA(LEVEL(1)), all of -O3 plus detailed loop analysis and basic whole-program analysis at link time
- -O5 or OPTIMIZE(3), HOT, IPA(LEVEL(2)), all of -O4 and detailed whole-program analysis at link time
Note: -O1 level is not supported.
Optimization progression
Table 1 details options you should use with each level and some useful additional options.| The xlc utility optimization option level | Additional batch options implied by optimization level | Additional recommended batch options |
|---|---|---|
| -O0 | None
|
ARCH(n)
|
| -O2 |
None
|
ARCH (n)
INLINE (to tune inlining) TUNE(n) |
| -O3 | NOSTRICT
|
ARCH(n)
TUNE(n) |
| -O4 | All of OPTIMIZE(3) plus:
HOT IPA(LEVEL(1)) |
ARCH(n)
TUNE(n) |
| -O5 | All of OPTIMIZE(3) plus:
HOT IPA(LEVEL(2)) |
ARCH(n)
TUNE(n) |