Purpose
Performs high-order loop analysis and transformations
(HOT) during optimization.
The -qhot compiler
option is a powerful alternative to hand tuning that provides opportunities
to optimize loops and array language. This compiler option will always
attempt to optimize loops, regardless of the suboptions you specify.
Syntax
Option:
.-nohot---------------------------------------.
>>- -q--+-hot--+------------------------------------+-+--------><
| .- :--------------------------. |
| V | |
'-=----+-noarraypad--------------+-+-'
+-arraypad--+-----------+-+
| '-=--number-' |
| .-1-. |
+-level--=--+-0-+---------+
| '-2-' |
+-vector------------------+
+-novector----------------+
+-fastmath----------------+
'-nofastmath--------------'
@PROCESS:
@PROCESS HOT[=suboptions] | NOHOT
Defaults
- -qnohot
- -qhot=noarraypad:level=0:novector:fastmath when -O3 is
in effect.
- -qhot=noarraypad:level=1:vector:fastmath when -qsmp, -O4 or -O5 is
in effect.
- Specifying -qhot without suboptions is equivalent to -qhot=noarraypad:level=1:vector:fastmath.
Parameters
- arraypad |
noarraypad
- Permits the compiler to increase the dimensions of arrays where
doing so might improve the efficiency of array-processing loops. (Because
of the implementation of the cache architecture, array dimensions
that are powers of two can lead to decreased cache utilization.) Specifying -qhot=arraypad when
your source includes large arrays with dimensions that are powers
of 2 can reduce cache misses and page faults that slow your array
processing programs. This can be particularly effective when the first
dimension is a power of 2. If you use this suboption with no number,
the compiler will pad any arrays where it infers there may be a benefit
and will pad by whatever amount it chooses. Not all arrays will necessarily
be padded, and different arrays may be padded by different amounts.
If you specify a number, the compiler will pad every array
in the code.
Note: Using arraypad can be unsafe,
as it does not perform any checking for reshaping or equivalences
that may cause the code to break if padding takes place.
- number
- A positive integer value representing the number of elements by
which each array will be padded in the source. The pad amount must
be a positive integer value. It is recommended that pad values be
multiples of the largest array element size, typically 4, 8, or 16.
- level=0
- Performs a subset of the high-order transformations and sets the
default to novector:noarraypad:fastmath.
- level=1
- Performs the default set of high-order transformations.
- level=2
- Performs the default set of high-order transformations and some
more aggressive loop transformations. -qhot=level=2 must
be used with -qsmp. This option performs aggressive
loop analysis and transformations to improve cache reuse and exploit
loop parallelization opportunities.
- vector | novector
- When specified with -qnostrict,
or an optimization level of -O3 or higher, vector causes
the compiler to convert certain operations that are performed in a
loop on successive elements of an array (for example, square root,
reciprocal square root) into a call to a routine in the Mathematical
Acceleration Subsystem (MASS) library in libxlopt. The vector suboption supports
single and double-precision floating-point mathematics, and is useful
for applications with significant mathematical processing demands.
novector disables the conversion of loop array operations
into calls to MASS library routines.
Since vectorization can
affect the precision of your program's results, if you are using -O4 or
higher, you should specify -qhot=novector if the change in
precision is unacceptable to you.
- fastmath |
nofastmath
- You can use this suboption to tune your application to either
use fast scalar versions of math functions or use the default versions.
-qhot=fastmath enables
the replacement of math routines with available math routines from
the XLOPT library only if -qstrict=nolibrary is
enabled. -qhot=nofastmath disables the replacement
of math routines by the XLOPT library. -qhot=fastmath is
enabled by default if -qhot is specified regardless of the
hot level.
Usage
If you do not also specify an optimization
level when specifying -qhot on the command line, the compiler
assumes -O2.
If you want to override the default level setting
of 1 when using -qsmp, -O4 or -O5,
be sure to specify -qhot=level=0 or -qhot=level=2 after the
other options.
If -O2, -qnohot, or -qnoopt is
used on the command line, specifying HOT options in an @PROCESS directive
will have no effect on the compilation unit.
The -C option
turns off some array optimizations.
You can use the -qreport option
in conjunction with -qhot or any optimization option
that implies -qhot to produce a pseudo-Fortran report showing
how the loops were transformed. The loop transformations are included
in the listing report if either the option -qreport or -qlistfmt is
also specified. This LOOP TRANSFORMATION
SECTION of the listing file also contains information about
data prefetch insertion locations. In
addition, when you use -qprefetch=assistthread to
generate prefetching assist threads, a message Assist thread
for data prefetching was generated also appears in the LOOP
TRANSFORMATION SECTION of the listing file. Specifying -qprefetch=assistthread guides
the compiler to generate aggressive data prefetching at optimization
level -O3 -qhot or higher. For more information,
see -qreport.