-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 Because of the implementation of the cache architecture, array dimensions that are powers of two can lead to decreased cache utilization. The arraypad suboption permits the compiler to increase the dimensions of arrays where doing so might improve the efficiency of array-processing loops. If you use the arraypad suboption with no numeric value, 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

The compiler performs a subset of the high-order transformations.

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

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

level=1

-qhot=level=1 is 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 -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.

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:

  • 4 Integers.
  • 8 2-byte units
  • 16 1-byte units

Applying -qhot=simd optimization is useful for applications with significant image processing demands.

This suboption has effect only if you specify an architecture that supports VMX instructions; in these conditions, -qhot=simd is set as the default.

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

vector | novector When specified with -qnostrict and -qignerrno, or an optimization level of -O3 or higher, the vector suboption 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 MASS library routine. This call will calculate several results at one time, which is faster than calculating each result sequentially. 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.

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, and -qhot=level=1. The -qhot option is also implied by -qsmp, -O4, and-O5.

Notes

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

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