Performing File-Level Optimization (--opt_level=3 option)

The --opt_level=3 option (aliased as the -O3 option) instructs the compiler to perform file-level optimization. You can use the --opt_level=3 option alone to perform general file-level optimization, or you can combine it with other options to perform more specific optimizations. The options listed in Table 4-2 work with --opt_level=3 to perform the indicated optimization:

Table 4-2 Options That You Can Use With --opt_level=3

If You ... Use this Option See
Want to create an optimization information file --gen_opt_level=n Section 4.3.1
Want to compile multiple source files --program_level_compile Section 4.4

NOTE

Do Not Lower the Optimization Level to Control Code Size

When trying to reduce code size, do not lower the level of optimization, as you might see an increase in code size. Instead, use the --opt_for_space option to control the code.