This switch enables optimization. It can have the following possible values:
-
ON
- Switches on optimizations, corresponding to level 2 optimizations.
-
OFF
- Switches of all kinds of optimizations.
-
DEFAULT
- Returns to default (i.e. command-line or config file) specified optimizations.
-
XYZ
- Parses the string and switches on the optimizations found in the string as if they were
passed using the -Oo command line option. The optimizations must be separated by
commas.
The following strings are supported:
-
REGVAR
- Use register variables.
-
UNCERTAIN
- Use uncertain optimizations.
-
SIZE
- Optimize for size.
-
STACKFRAME
- Skip stackframes.
-
PEEPHOLE
- Peephole optimizations.
-
ASMCSE
- Use common subexpression elimination at the assembler level.
-
LOOPUNROLL
- Unroll loops
-
TAILREC
- change tail recursion to regular while
-
ORDERFIELDS
- Reorder fields if this results in better alignment.
-
FASTMATH
- Fast math operations
-
REMOVEEMPTYPROCS
- remove calls to empty procedures.
-
CSE
- Use common subexpression elimination
-
DFA
- Use DFA (Data Flow Analysis).
Example:
{$OPTIMIZATION ON}
is equivalent to
{$OPTIMIZATION LEVEL2}
Multiple optimizations can be specified with:
{$OPTIMIZATION REGVAR,SIZE,LEVEL2}
This switch is also activated by the -Ooxxx command line switch. Note the small ’o’: it is -Oo
followed by the switch name.