-qhot

Description

Instructs the compiler to perform high-order loop analysis and transformations during optimization.

Syntax

Read syntax diagramSkip visual syntax diagram        .-nohot------------------------------.
>>- -q--+-hot--+---------------------------+-+-----------------><
               |    .-vector-------------. |
               |    +-simd---------------+ |
               '-=--+-arraypad--+------+-+-'
                    |           '-=--n-' |
                    +-level--=--+-0-+----+
                    |           '-1-'    |
                    +-nosimd-------------+
                    '-novector-----------'

where:

arraypad 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.
arraypad=n The compiler will pad every array in the code. The pad amount must be a positive integer value, and each array will be padded by an integral number of elements. Because n is an integral value, we recommend that pad values be multiples of the largest array element size, typically 4, 8, or 16.

level=0

level=1

The compiler performs a subset of the of High Order Transformations.

-qhot=level=1 will be equivalent to -qhot and the compiler options that imply -qhot also imply -qhot=level=1 unless -qhot=level=0 is explicitly specified.

The default hot level for all -qhot suboptions other than level is 1. For example specifying -O3 -qhot=novector sets the hot level to 1.

Specifying -O3 implies -qhot=level=0, unless you explicitly specify -qhot or -qhot=level=1 option.

Specifying -O4 or -qsmp implies -qhot=level=1, unless you explicitly specify -qhot=level=0 option.

simd | nosimd The compiler converts certain operations that are performed in a loop on successive elements of an array into a call to a Vector Multimedia Extension (VMX) instruction. This call calculates several results at one time, which is faster than calculating each result sequentially.

If you specify -qhot=nosimd, the compiler performs optimizations on loops and arrays, but avoids replacing certain code with calls to VMX instructions.

This suboption has effect only when the effective architecture supports VMX instructions and you specify -qenablevmx.

Note:
This suboption is supported on AIX 5L Version 5.3 with the 5300-03 Recommended Maintenance package and higher.
vector | novector When specified with -qnostrict and -qignerrno, or an optimization level of -O3 or higher, the compiler converts 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 MASS library routine. This call will calculate several results at one time, which is faster than calculating each result sequentially.

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.

Default

The default is -qnohot.

Specifying -qhot without suboptions implies -qhot=nosimd, -qhot=noarraypad, , -qhot=vector, -qhot=level=1 and -qhot=vector . The -qhot option is also implied by -qsmp, -O4, and-O5.

When you specify -qhot=level=0, the default is set to novector, nosimd and noarraypad.

Notes

If you do not also specify optimization of at least level 2 when specifying -qhot on the command line, the compiler assumes -O2.

If you specify an architecture that supports VMX instructions and -qhot and -qenablevmx, -qhot=simd will be set as the default.

If you specify -qhot=level=0 before -O4 , level will be set to 1. If you specify -qhot=level=0 after -O4, level will be set to 0.

Because of the implementation of the cache architecture, array dimensions that are powers of two can lead to decreased cache utilization. The optional arraypad suboption permits the compiler to increase the dimensions of arrays where doing so might improve the efficiency of array-processing loops. If you have large arrays with some dimensions (particularly the first one) that are powers of 2, or if you find that your array-processing programs are slowed down by cache misses or page faults, consider specifying -qhot=arraypad.

The simd suboption optimizes array data to run mathematical operations in parallel where the target architecture allows such operations. Parallel operations occur in 16-byte vector registers. The compiler divides vectors that exceed the register length into 16-byte units to facilitate optimization. A 16-byte unit can contain one of the following types of data:

Short vectorization does not support double-precision floating point mathematics, and you must specify -qarch=ppc970. Applying -qhot=simd optimization is useful for applications with significant image processing demands.

In order to run mathematical operations in parallel, the vector suboption calls MASS library routines to optimize array date, where applicable. The compiler uses standard registers with no vector size restrictions. The vector suboption supports single and double-precision floating-point mathematics, and is useful for applications with significant mathematical processing demands.

Both -qhot=arraypad and -qhot=arraypad=n are unsafe options. They do not perform any checking for reshaping or equivalences that may cause the code to break if padding takes place.

Example

The following example turns on the -qhot=arraypad option:

xlc -qhot=arraypad myprogram.c

Related information