HP 3000 Manuals

Invoking the Optimizer [ HP Pascal/iX Programmer's Guide ] MPE/iX 5.0 Documentation


HP Pascal/iX Programmer's Guide

Invoking the Optimizer 

You can invoke the optimizer in the source code or in the compiler
command.  To invoke the optimizer in the source code, use the OPTIMIZE
compiler option as follows:

For                                   Use the Form 

Level one optimization                OPTIMIZE 'LEVEL1'

Level two optimization                OPTIMIZE 'LEVEL2'  or OPTIMIZE ON

(For more information on the OPTIMIZE compiler option, see the HP 
Pascal/iX Reference Manual or the HP Pascal/HP-UX Reference Manual,
depending on your implementation.)

To invoke the optimizer in the compiler command on the MPE/iX operating
system, include the OPTIMIZE compiler option in the INFO string (see
Appendix A ).

To invoke the optimizer in the compiler command on the HP-UX operating
system, append one of the following options to the compiler command (see
Appendix B ).

For                                   Append the Option 

Level one optimization                +O1

Level two optimization                +O2 or -O

Basic Blocks 

The compiler behaves differently on large procedures when you optimize at
Level 2.  Any procedure containing more than 500 basic blocks causes the
optimizer to drop down to Level 1 optimization for that procedure.  A
warning is emitted for that procedure:

     Optdriver: <num> basic blocks; dropping to level 1 optimization for <proc>. (6059)

            

You can request Level 2 optimization and change the number of basic
blocks at which the optimizer drops down to Level 1 optimization by
specifying[REV BEG] num in the compiler option:

     $OPTIMIZE 'BASIC_BLOCKS num'$

You can change the default level (500) at which the optimizer drops down
to Level 1 optimization (without requesting any level of optimization) by
specifying num in the compiler option:[REV END]

     $OPTIMIZE 'BASIC_BLOCK_FENCE num'$

For more information on basic blocks, refer to the HP Pascal/iX Reference 
Manual or the
HP Pascal/HP-UX Reference Manual, depending on your implementation.



MPE/iX 5.0 Documentation