The following options restrict or preclude the compiler's ability to optimize your program:
Option | Description |
---|---|
-O0 | Disables all optimizations. |
-mp1 | Improve floating-point precision. Speed impact is less than with -mp. |
-fp IA-32 only |
Disable using the EBP register as a general purpose register. |
-prec_div IA-32 only |
Disables the floating point division-to-multiplication optimization. |
-fp_port |
Round fp results at assignments and casts (some speed impact). |
-ftz[-] Itanium-based systems only |
Enable [disable] flush denormal results to zero. The -ftz option is OFF by default, but turned ON with -O3. |
-IPF_fma[-] Itanium-based systems only |
Enable [disable] the combining of floating point multiplies and add/subtract operations. |
-IPF_fltacc[-] Itanium-based systems only |
Enable [disable] optimizations that affect floating point accuracy. |
-IPF_flt_eval_method0 Itanium-based systems only |
Floating-point operands evaluated to the precision indicated by program. |
-IPF_fp_speculation<mode> Itanium-based systems only |
Enable floating point speculations with the following <mode>
conditions:
|
Note
You can turn off all optimizations for specific functions by using #pragma optimize. In the following example, all optimization is turned off for function foo():
#pragma optimize("", off) foo(){ ... } |
Valid second arguments for #pragma optimize are "on" or "off." With the "on" argument, foo() is compiled with the same optimization as the rest of the program. The compiler ignores first argument values.