High-order transformation (HOT)

As part of the XL compiler optimization suite, the HOT transformations focus specifically on loops which typically account for the majority of the execution time for most applications. HOT transformations perform in-depth loop analysis to minimize their execution time.

Loop optimization analysis includes:

The goals of these optimizations include:

Compiling with -O3 and higher triggers HOT transformations by default. You can also see performance benefits by specifying -qhot with -O2, or adding more -qhot optimizations than the default level=0 at -O3 .

You can see particular -qhot benefits if your application contains Fortran 90-style array language constructs, as HOT transformations include elimination of intermediate temporary variables and statement fusion.

You can also use directives to assist in loop analysis. Assertive directives such as INDEPENDENT or CNCALL allow you to describe important loop characteristics or behaviors that HOT transformations can exploit. Prescriptive directives such as UNROLL or PREFETCH allow you to direct the HOT transformations on a loop-by-loop basis. You can also specify the -qreport compiler option to generate information about loop transformations. The report can assist you in deciding where best to include directives to improve the performance of your application. For example, you can use this section of the listing to identify non-stride-one references that may prevent loop vectorization.

You can use the -qreport option in conjunction with -qhot or any optimization option that works with -qhot to produce a pseudo-Fortran report showing how the loops were transformed. The LOOP TRANSFORMATION SECTION of the listing file also contains information about data prefetch insertion locations.

When used with -qsmp, -qhot=level=2 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. If you use -qhot=level=2 and -qsmp together with -qreport or -qlistfmt, you can see this information on aggressive loop analysis performed on loop nests in the LOOP TRANSFORMATION SECTION of the listing file or compiler report.

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. For details, see -qprefetch in the XL Fortran Compiler Reference.

With the -qassert=refalign suboption, the compiler might generate more efficient code. This assertion is particularly useful when you target a Single Instruction Multiple Data (SIMD) architecture with -qhot=level=0 or -qhot=level=1 with the -qsimd=auto option.

In addition to general loop transformation, -qhot supports suboptions that you can specify to enable additional transformations detailed in this section.

See the following topics for further information about HOT transformations: