Using high-order loop analysis and transformations

High-order transformations are optimizations that specifically improve the performance of loops through techniques such as interchange, fusion, and unrolling.

The goals of these loop optimizations include:

To enable high-order loop analysis and transformations, you use the -qhot option, which implies an optimization level of -O2. The following table lists the suboptions available for -qhot.

Table 1. -qhot suboptions
Suboption Behavior
level=0 Instructs the compiler to perform a subset of high-order transformations that enhance performance by improving data locality. This suboption implies -qhot=novector and -qhot=noarraypad. This level is automatically enabled if you compile with -O3.
level=1 This is the default suboption if you specify -qhot with no suboptions. This level is also automatically enabled if you compile with -O4 or -O5. This is equivalent to specifying -qhot=vector.
level=2 When used with -qsmp, instructs the compiler to perform the transformations of -qhot=level=1 plus some additional transformation on nested loops. The resulting loop analysis and transformations can lead to more cache reuse and loop parallelization.
vector When specified with -qnostrict and -qignerrno, or -O3 or a higher optimization level, instructs the compiler to transform some loops to use the optimized versions of various math functions contained in the MASS libraries, rather than use the system versions. The optimized versions make different trade-offs with respect to accuracy and exception-handling versus performance. This suboption is enabled by default if you specify -qhot with no suboptions. Also, specifying -qhot=vector with -O3 implies -qhot=level=1.
arraypad Instructs the compiler to pad any arrays where it infers there might be a benefit and to pad by whatever amount it chooses.