Compaq COBOL AAQ2G1FTK User Manual

Page 492

Advertising
background image

Optimizing Your Compaq COBOL Program
15.1 Specifying Optimization on the Compiler Command Line

The

-tune

flag has the following form:

-tune keyword

The

-tune

flag is the equivalent of the /OPTIMIZE=TUNE qualifier.

On Windows NT systems, /OPTIMIZE and /TUNE specify optimization. The
/OPTIMIZE option has the following form:

/OPTIMIZE[=n]

The /TUNE option has the following form:

/TUNE[=keyword]

On all systems, n is a number ranging from 0 to 4, specifying the level of
optimization. In brief, these levels mean the following:

Level 0—Has the same effect as /NOOPTIMIZE. All optimizations are turned
off, and the compiler does not check for unassigned variables.

Level 1—Enables local optimizations, including instruction scheduling and
recognition of common subexpressions.

Level 2—Enables all level 1 optimizations, and adds some global
optimizations (such as split lifetime analysis, code motion, strength reduction
and test replacement, and code scheduling).

Level 3—Enables all level 2 optimizations, and adds more global
optimizations (such as decimal shadowing, integer multiplication and
division expansion, using shifts, loop unrolling, and code replication to
eliminate branches). All optimizations are turned on.

Level 4—Is identical to level 3 for COBOL. This is the default if you specify
optimize with no value, or if you compile without specifying any form of the
optimize option on the command line.

/OPTIMIZE=TUNE=keyword (or

-tune keyword

or /TUNE=keyword) specifies the

kind of optimized code to be generated, allowing you to tune optimization to the
hardware. The keyword can be any of the following:

GENERIC—Generates and schedules code that will execute well for both
generations of Alpha processors. This is the default.

This provides generally efficient code for those cases where both processor
generations are likely to be used.

HOST—Generates and schedules code optimized for the processor generation
in use on the system being used for compilation.

EV4—Generates and schedules code optimized for the 21064, 21064A, 21066,
and 21068 implementations of the Alpha chip.

EV5—Generates and schedules code optimized for the 21164 implementation
of the Alpha chip. This processor generation is faster than EV4.

EV56—Generates code for some 21164 chip implementations that use the
byte and word manipulation instruction extensions of the Alpha architecture.

Running programs compiled with the EV56 keyword may incur emulation
overhead on EV4 and EV5 processors, but will still run correctly on OpenVMS
Version 7.1 (or later) systems.

15–2 Optimizing Your Compaq COBOL Program

Advertising