Trades code size for performance by controlling how much loop optimization the compiler performs.
The compiler can use several different techniques for specifically targeting loop optimizations, such as loop unrolling and inlining. However, these techniques can impact code size.
is one of:
- Specifies that the compiler does not perform any loop optimization. This option is usually best for code size.
- Specifies that the compiler performs some loop optimization. This option tries to balance code size and performance.
- Specifies that the compiler performs high-level optimization, including aggressive loop optimization. This option is usually best for performance.
Non-zero values (1 or 2) can be used when either the
-O3 -Otime or
-O2 -Otime --vectorize options are given.
armcc -O3 -Otime --loop_optimization_level=2 ...
The default is 1 for
-O3 -Otime and
-O2 -Otime --vectorize, otherwise it is 0.