Controls optimization of assembly language.
#pragma optimizewithasm on | off | reset
This #pragma controls whether the optimizer queries the backend compiler for the effects of inline assembly instructions so it can safely perform code motion, dead code removal, and constant propagation that may affect assembly code. This #pragma should usually remain on.
Use #pragma optimizewithasm on to tell the optimizer it is safe to optimize assembly language statements in C/C++ source code. This is available in the x86 compiler.
Use #pragma optimizewithasm off to tell the optimizer to explicitly disable several optimizations in functions containing inline assembly to avoid removing or reordering code that might change the bahavior of the inline assembly.
NOTE The backend compiler may have additional options or directives to control optimization of the actual inline assembly code.
This pragma corresponds to the Inline Assembly settings in the CodeGen panel. To check this setting, use __option (optimizewithasm), described in Checking Settings. The default setting is off.