Enable selected optimizations
|
Enables only the optimizations that you select from the secondary list of optimizations. Default = False
Dead store elimination (-Ob)
|
Removes superfluous stores. Click the down-arrow to select from the possible values (True, False). Default = False
|
Eliminate duplicate expressions within basic blocks and functions
(-Oc)
|
Instructs the compiler to eliminate common subexpressions within groups of statements unbroken by jumps (basic blocks) and functions. This option globally eliminates duplicate expressions within the target scope and stores the calculated value of those expressions once (instead of recalculating the expression). Use this option if you prefer to reuse expressions rather than create explicit stack locations for them. Default = False
|
Enable loop induction variable and strength reduction
(-Ov)
|
Instructs the compiler to create induction variables and perform strength reduction, which optimizes for loops speed. Use this option when you are compiling for speed and your code contains loops.
The optimizer uses induction to create new variables (induction variables) from expressions used in loops. The optimizer assures that the operations performed on these new variables are computationally less expensive (reduced in strength) than those used by the original variables.
Optimizations are common if you use array indexing inside loops because a multiplication operation is required to calculate the position in the array that is indicated by the index. For example, the optimizer creates an induction variable out of the operation v[i] in the following code because the v[i] operation requires multiplication. This optimization also eliminates the need to preserve the value of i :
int v[10];
void f(int x, int y, int z)
{ int i;
for (i = 0; i < 10; i++)
v[i] = x * y * z;
}
With induction variables set, the code changes:
int v[10];
void f(int x, int y, int z)
{ int i, *p;
for (p = v; p < &v[9]; p++)
*p = x * y * z;
}
Default = False
|
Enable Pentium instruction scheduling (-5)
|
Generates Pentium instructions. While this option increases the speed at which the application runs on Pentium machines, expect the program to be a bit larger than when compiled with the 80386 or i486 options. Also, Pentium-compiled code sustains a performance hit on non-Pentium systems. Default = False
|
Expand common intrinsic functions
(-Oi)
|
Instructs the compiler to generate the code for common memory functions like strcpy() within the scope of your function. This eliminates the need for a function call. The resulting code executes faster, but it is larger. The following functions are inlined with this option:
alloca , fabs , memchr , memcmp , memcpy , memset , rotl , rotr ,
stpcpy , strcat , strchr , strcmp , strcpy , strlen , strncat , strncmp , strncpy , strnset , strrchr .
You can control the inlining of these functions with the pragma intrinsic . For example,
causes the compiler to generate inline code for all subsequent calls to strcpy in your function, and
#pragma intrinsic -strcpy
prevents the compiler from inlining strcpy . Using these pragmas in a file overrides any compiler option settings.
Default = False
|
Optimize jumps
(-O)
|
Instructs the compiler to reduce the code size by eliminating redundant jumps and reorganizing loops and switch statements. When this option is set, the sequences of stepping in the debugger can be confusing because of the reordering and elimination of instructions. If you are debugging at the assembly level, you might want to disable this option. Default = False
|
Use register variables
(-r)
|
Instructs the compiler to automatically assign register variables if possible, even when you do not specify a register variable by using the register keyword. Default = False
|
|
Dead store elimination -Ob
Eliminate duplicate expression within basic blocks and functions -Oc
Enable loop induction variable and strength reduction -Ov
Enable Pentium instruction scheduling -5
Expand common intrinsic functions -Oi
Optimize jumps -O
Use register variables -r
|
Platform not supported
Platform not supported
Platform not supported
Platform not supported
Platform not supported
Platform not supported
Platform not supported
|
Platform not supported
Platform not supported
Platform not supported
Platform not supported
Platform not supported
Platform not supported
Platform not supported
|
Dead store elimination -Ob
Eliminate duplicate expression within basic blocks and functions -Oc
Enable loop induction variable and strength reduction -Ov
Enable Pentium instruction scheduling -5
Expand common intrinsic functions -Oi
Optimize jumps -O
Use register variables -r
|
Platform not supported
Platform not supported
Platform not supported
Platform not supported
Platform not supported
Platform not supported
Platform not supported
|
Platform not supported
Platform not supported
Platform not supported
Platform not supported
Platform not supported
Platform not supported
Platform not supported
|
Platform not supported
Platform not supported
Platform not supported
Platform not supported
Platform not supported
Platform not supported
Platform not supported
|