beautypg.com

Compaq COBOL AAQ2G1FTK User Manual

Page 494

background image

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

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

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

EV6—Generates code for the 21264 chip implementation that uses the
following extensions to the base Alpha instruction set: BWX (Byte/Word
manipulation) and MAX (Multimedia) instructions, square root and FIX
(Floating-point convert) instructions, and CIX (Count) instructions.

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

EV67—Generates code for the 21264A chip implementation that uses the
following extensions to the base Alpha instruction set: BWX (Byte/Word
manipulation) and MAX (Multimedia) instructions, square root and FIX
(Floating-point convert) instructions, and CIX (Count) instructions.

Programs compiled with the EV67 option may incur emulation overhead on
EV4, EV5, EV56, EV6, and PCA56 processors, but will still run correctly on
OpenVMS Version 7.1 (or later) systems.

PCA56—Generates code for the 21164PC chip implementation that uses
the byte and word manipulation instruction extensions and multimedia
instruction extensions of the Alpha architecture.

Programs compiled with the PCA56 option may incur emulation overhead on
EV4, EV5, and EV56 processors, but still run correctly on OpenVMS Version
7.1 (or later) systems.

Note

If a program contains declarations of non-EXTERNAL variables that are
not referenced in the program, the Compaq COBOL compiler does not
allocate those variables. These variables are not affected by /OPTIMIZE;
they simply are not allocated. This feature improves both resource usage
and run-time performance, and allows the use of site ‘‘copybooks’’ that
have numerous standardized variables. Only those copybook variables
that are referenced will be allocated within a given program.

Optimization and Debugging

You should disable optimization when you compile a program for debugging.
Optimizations can cause unexpected and confusing behavior in a debugging
session by changing the order of machine code. When you turn optimization off, a
debugging session is expedited and simplified because the machine code is put in
the same order as the lines in your source program.

On the Tru64 UNIX operating system, full optimization, corresponding to the -O4
or -O flag, is the default unless you specify the

-g

flag on the command line for

debugging. The

-g

flag disables optimization entirely, and displays this message:

cobol: Warning: . . .

File not optimized; use -g3 if both

optimization and debugging wanted

15–4 Optimizing Your Compaq COBOL Program