The +Onoconservative option relaxes the optimizer’s

 

assumptions about the target program.

 

The +Onoconservative option relaxes the optimizer’s

 

assumptions about the target program.

 

The default is +Onoconservative. This option has been

 

deprecated starting with HP-UX version 11i and later.

+O[no]limit

+Olimit suppresses optimizations that significantly

 

increase compilation time or that can consume large

 

amounts of memory at compile time. This option is only

 

effective at optimization level 2 or higher.

 

The +Onolimit option allows optimizations to be

 

performed regardless of their effect on compilation time or

 

memory usage. The default is +Olimit.

+O[no]loop_transform

Enables [disables] the following transformations: loop unroll

 

and jam, loop distribution, loop interchange, loop blocking,

 

loop fusion, and loop unroll. The default is

 

+Oloop_transform.

+O[no]size

+Osize suppresses optimizations that significantly increase

 

code size. This option is only effective at optimization level

 

2 or higher. The +Onosize option permits optimizations

 

that can increase code size. The default is +Onosize.

Fine-tuning optimization options

The following options allow you to fine-tune the optimization process by providing control over the specific techniques that the optimizer applies to your program. The syntax for using these options is

+O[no]optimization

where optimization is a parameter that specifies an

 

optimization technique to apply to your program. The

 

different parameters are described below. The prefix no

 

negates the effect of optimization.

The options do not override a specified level of optimization, nor do they imply a particular level. To use any of these options you must also include the +On option on the same command line, where n specifies the level at which the type of optimization can be performed.

For example, if you find that the optimizer is causing your program to produce different floating-point results from those produced by the unoptimized program, you could use the following command line to suppress optimizations that affect floating-point calculations:

f90 +O3 +Onomoveflops +Ofltacc my_prog.f90

If an option is mistakenly used at a level for which the corresponding optimization is not performed, the compiler will issue a warning message.

The defaults given in the following descriptions are in effect only at the specified optimization levels, unless stated otherwise.

+O[no]cache_pad_common

+Ocache_pad_common can improve program

 

performance by padding common blocks to avoid

 

cache collisions. Cache-line collisions occur when the

 

difference between the addresses of two data points

 

is a multiple of the cache size. By inserting empty

 

space between large variables (for example, arrays),

 

the optimizer ensures that they do not start at nearby

 

addresses, where the possibility of a cache collision

 

is greater. This option is only effective at optimization

 

level 3 or higher.

40 Compiling and linking

Page 40
Image 40
HP UX Fortran Software manual Fine-tuning optimization options, F90 +O3 +Onomoveflops +Ofltacc myprog.f90