English
Language : 

AN3350 Datasheet, PDF (173/185 Pages) STMicroelectronics – eTPU compiler tools
AN3350
Pragmas for optimization
22.10
opt_unroll_loops
Controls the use of loop unrolling optimization.
Syntax
#pragma opt_unroll_loops on | off | reset
Remarks
If you enable this pragma, the compiler places multiple copies of a loop’s statements inside
a loop to improve its speed.
This pragma does not correspond to any panel setting. By default, this settings is related to
the global_optimizer level.
22.11
Note:
opt_vectorize_loops
Controls the use of loop vectorizing optimization.
Syntax
#pragma opt_vectorize_loops on | off | reset
Remarks
If you enable this pragma, the compiler improves loop performance.
Do not confuse loop vectorizing with the vector instructions available in some processors.
Loop vectorizing is the rearrangement of instructions in loops to improve performance. This
optimization does not optimize a processor’s vector data types.
By default, this pragma is off.
22.12
optimization_level
Controls global optimization.
Syntax
#pragma optimization_level 0 | 1 | 2 | 3 | 4 | reset
Remarks
This pragma specifies the degree of optimization that the global optimizer performs.
To select optimizations, use the pragma optimization_level with an argument from 0
to 4. The higher the argument, the more optimizations performed by the global optimizer.
The reset argument specifies the previous optimization level.
For more information on the optimization the compiler performs for each optimization level,
refer to the Targeting manual for your target platform.
These pragmas correspond to the settings in the Global Optimizations panel. By default, this
pragma is disabled.
Doc ID 018512 Rev 2
173/185