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.

Related information
global_optimizer
ipa
ipa_inline_max_auto_size
ipa_not_complete
load_store_elimination
opt_common_subs
opt_dead_assignments
opt_dead_code
opt_lifetimes
opt_loop_invariants
opt_propagation
opt_strength_reduction
opt_strength_reduction_strict
opt_unroll_loops
opt_vectorize_loops
optimize_for_size
optimizewithasm
pack
strictheaderchecking