5.6.3.3 Optimization
| Option | Description | Command Line |
|---|---|---|
| Optimization Level | Select an optimization level. Your compiler edition may support only
some optimizations. Equivalent to -On option, where
n is an option below:0 - Do not optimize. The compiler’s goal is to reduce the cost of compilation and to make debugging produce the expected results. 1 - Optimize. Optimizing compilation takes somewhat longer and a lot more host memory for a large function. The compiler tries to reduce code size and execution time. 2 - Optimize even more. The compiler performs nearly all supported optimizations that do not involve a space-speed trade-off. 3 - Optimize yet more favoring speed (superset of O2). s - Optimize yet more favoring size (superset of O2). | -o0
-o1,-o
-o2
-o3
-os |
| Unroll loops | This option often increases execution speed at the expense of larger
code size. Check to perform the optimization of loop unrolling. This is only done for loops whose number of iterations can be determined at compile time or run time. Uncheck to not unroll loops. | 6.6.6.6.23 -funroll-loops |
| Omit frame pointer | Check to not keep the Frame Pointer in a register for functions that
don’t need one. Uncheck to keep the Frame Pointer. | 6.6.6.7.7 -fomit-frame-pointer |
| Unlimited procedural abstraction | Enable the procedure abstraction optimization. There is no limit on the nesting level. | -mpa |
| Procedural abstraction level | Enable the procedure abstraction optimization up to level
n.
| -mpa=n |
| Pre-optimization instruction scheduling | Default for optimization level: - Disable - Enable | -f[no-]schedule-insns |
| Post-optimization instruction scheduling | Default for optimization level: - Disable - Enable | -f[no-]schedule-insns2 |
