OPTIMIZATIONS
Function
-Oc
None
None
None
None
This option is disabled and present only for compatibility reasons for the HC(S)08.
Performs common subexpression elimination (CSE). The Compiler generates the code for common subexpressions and assignments only once and reuses the result. Depending on available registers, a common subexpression may produce more code due to multiple spills.
-Oc
In the following listing using the CSE option causes incorrect optimizations. This option is disabled for the HC(S)08.
void main(void) { int x; int *p; x = 7; /* here the value of x is set to 7 */ p = &x; *p = 6; /* here x is set to 6 by the alias *p */ /* here x is assumed to be equal to 7 and Error is called */ if(x != 6) Error(); }