C/C++ Compiler (cl.hlp) (Table of Contents; Topic list)
Optimization Options
                                             Up Contents Index Back
─────C/C++ Compiler─────────────────────────────────────────────────────────
 
     Optimization selections make your program smaller or faster by
     eliminating unnecessary instructions and rearranging code.
 
     Option     Description
 
     /Oa      Specifies that aliases do not exist in your code;
                you must ensure that they do not
     /Ow      Specifies that aliases might occur across function
                calls
     /Oc      Enables block-level common subexpression optimization:
                allows the compiler to calculate the value of a common
                subexpression once (default)
     /Og      Enables global-level common subexpression optimization:
                allows the compiler to calculate the value of a common
                subexpression once
     /Od      Disables optimization
     /Oe      Disables register keyword and allows storage of
                frequently used variables and subexpressions in
                registers
     /Ol      Enables loop optimizations: allows moving or rewriting
                code so that it executes faster
     /Op      Improves floating point consistency; allows better
                tests for equality and inequality
     /Or      Enables single exit point from functions; useful when
                debugging with CodeView
     /Os      Minimizes executable file size
     /O, /Ot  Minimizes execution speed (default)
 
     Miscellaneous
 
     /Ob<n>   Controls inline expansion, where <n> is a digit from 0
                through 2
     /Oi      Generates intrinsic functions
     /On      Turns off potentially unsafe loop optimizations
     /Oz      Turns on potentially unsafe loop optimizations
     /Oo[-]   Turns on [or off] post code-generation optimizing
                (/Oi-, p-code default)
     /Ox      Maximizes optimization
 
     P-Code
 
     /Oq      Turns on p-code optimization
     /Of[-]   Turns on [or off] p-code quoting (default)
     /Ov[-]   Controls frame sorting (default)
 
     The letters following the /O, including the digits in b<n>, can
     appear in any order. When there is a conflict, the compiler uses
     the last /O option given. Each option applies to all source files
     following it on the command line.
 
     NOTE: If you are using the debugger, you may want to set the /Od
           option. If you don't specify /Od, some forms of the compiler
           perform optimizations that move code, possibly making it
           difficult for you to follow your program in the debugger.
 
     See also: Maximum Optimization
               Preparing for Debugging
               Removing Stack Probes (/Gs)
               optimize pragma
               intrinsic pragma
               check_stack pragma
                                    -♦-