Crossware

Table of Contents        Previous topic       Next topic       

C/C++ COMPILER->Compiler command line options->Conditional Constant Propagation (/Oo)

The /Oo option tells the compiler to perform conditional constant propagation.  

Constants are propagated through the data path allowing, where possible, variables in expressions to be replaced by constants.  This includes the controlling expressions of conditional branches and so may allow the compiler to determine that a branch can never be executed.  Unreachable code can then be identified and removed.

Transformation of the program into an special intermediate form is required in order for this optimization to be performed.

If this optimization is enable, it is recommended that dead code elimination is enabled too (since the compiler may generate additional assignments that it expects will be later eliminated if they are not required).