8.124 --loop_optimization_level=opt

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.

Syntax

--loop_optimization_level=opt

Where opt is one of:

0
Specifies that the compiler does not perform any loop optimization. This option is usually best for code size.
1
Specifies that the compiler performs some loop optimization. This option tries to balance code size and performance.
2
Specifies that the compiler performs high-level optimization, including aggressive loop optimization. This option is usually best for performance.

Restrictions

Non-zero values (1 or 2) can be used when either the -O3 -Otime or -O2 -Otime --vectorize options are given. For example:

armcc -O3 -Otime --loop_optimization_level=2 ...

Default

The default is 1 for -O3 -Otime and -O2 -Otime --vectorize, otherwise it is 0.

Non-ConfidentialPDF file icon PDF versionARM DUI0472M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.