Table6-2 lists the “packaged” options. These options enable or disable a set of related optimizations, such as optimizations that do not increase code size. Table6-3 lists options that enable or disable specific optimizations.

The options in both tables can be combined on the same command line, except as noted. For example, the following command line requests aggressive optimizations at level 2 that do not increase code size:

$ f90 +02 +Oaggressive +Osize prog.f90

Nearly all of the optimization options can be used to enable or disable an optimization or a package of optimizations. For example, the following command line requests aggressive level 4 optimizations that do not result in roundoff errors:

$ f90 +O4 +Oaggressive +Ofltacc prog.f90

The f90.1 manpage fully describes all of the optimization options.

Table 28 Packaged optimization options

Option

Level

Function

 

 

 

+O[no]aggressive

+O2or higher

Enable [disable] optimizations that can significantly improve

 

 

performance in standard-conforming programs. The default

 

 

is +Onoaggressive. For more information about this

 

 

option, see “Conservative vs. aggressive optimization”

 

 

(page 99).

 

 

 

+O[no]all

Invokes highest level

Enable [disable] maximum optimization. The default is

 

 

+Onoall.

 

 

 

+O[no]autopar

 

Do [do not] automatically parallelize loops that are deemed

 

 

safe and profitable by the loop parallelizer. The default is

 

 

+Onoautopa. The +Oautopar option can be used for

 

 

programs at optimization levels, +O3and above.

 

 

If both +Oopenmpand +Oautopar are specified on the

 

 

command line, the OpenMP directives gain precedence

 

 

over the +Oautoparoption. The compiler auto-parallelizes

 

 

only the loops of code that are not controlled by the

 

 

OpenMP directives.

 

 

To compile a program with +Oautoparsupport, the

 

 

libcps, libomp, and libpthreads runtime support

 

 

libraries must be present at compile-time and runtime. This

 

 

feature is available on Integrity systems and HP 9000

 

 

systems.

 

 

 

+O[no]conservative

+O2or higher

Suppress [do not suppress] optimizations that assume strict

 

 

conformity to the Fortran90 standard. The default is

 

 

+Onoconservative. For more information about this

 

 

option, see “Conservative vs. aggressive optimization”

 

 

(page 99).

 

 

NOTE: This option is valid only on the PA-RISC systems.

 

 

 

+O[no]limit

+O2or higher

Enable [disable] optimizations that do not make large

 

 

demands on system resources. The default is +Onolimit.

 

 

 

+O[no]size

+O2or higher

Enable [disable] optimizations that do not significantly

 

 

increase code size. The default is +Onosize.

 

 

 

Table 29 Fine-tuning optimization options

Level

Level

Function

+O[no]cache_pad_common

+O3or higher

Pad [do not pad] common

 

 

blocks to avoid cache

 

 

 

92 Performance and optimization