-qreport

Pragma equivalent

None.

Purpose

Produces listing files that show how sections of code have been optimized.

A listing file is generated with a .lst suffix for each source file named on the command line. When used with an option that enables vectorization, the listing file shows a pseudo-C code listing and a summary of how program loops are optimized. The report also includes diagnostic information to show why specific loops could not be vectorized. For instance, when -qreport is used with -qsimd=auto, messages are provided to identify non-stride-one references that can prevent loop vectorization.

The compiler also reports the number of streams created for a given loop, which include both load and store streams. This information is included in the Loop Transformation section of the listing file. You can use this information to understand your application code and to tune your code for better performance. For example, you can distribute a loop which has more streams than the number supported by the underlying architecture. The POWER8® processors support both load and store stream prefetch.

Syntax

Read syntax diagramSkip visual syntax diagram
        .-noreport-.   
>>- -q--+-report---+-------------------------------------------><

Defaults

-qnoreport

Usage

For -qreport to generate a loop transformation listing, you must also specify one of the following options on the command line:
  • -qhot
  • -qsmp
  • -O3 or higher
For -qreport to generate PDF information in the listing, you must specify the following option in the command line:
  • -qpdf2 -qreport
For -qreport to generate a parallel transformation listing or parallel performance messages, you must also specify one of the following options on the command line:
  • -qsmp
  • -O5
  • -qipa=level=2

To generate data reorganization information, specify the optimization level -qipa=level=2 or -O5 together with -qreport. Reorganizations include array splitting, array transposing, memory allocation merging, array interleaving, and array coalescing.

To generate information about data prefetch insertion locations, use the optimization level of -qhot, or any other option that implies -qhot together with -qreport. This information appears in the LOOP TRANSFORMATION SECTION of the listing file. In addition, when you use -qprefetch=assistthread to generate prefetching assist threads, the message: Assist thread for data prefetching was generated also appears in the LOOP TRANSFORMATION SECTION of the listing file.

To generate a list of aggressive loop transformations and parallelization performed on loop nests in the LOOP TRANSFORMATION SECTION of the listing file, use the optimization level of -qhot=level=2 and -qsmp together with -qreport.

The pseudo-C code listing is not intended to be compilable. Do not include any of the pseudo-C code in your program, and do not explicitly call any of the internal routines whose names may appear in the pseudo-C code listing.

Predefined macros

None.

Examples

To compile myprogram.c so the compiler listing includes a report showing how loops are optimized, enter:
xlc -qhot -O3 -qreport myprogram.c
To compile myprogram.c so the compiler listing also includes a report showing how parallelized loops are transformed, enter:
xlc_r -qhot -qsmp -qreport myprogram.c

Related information



Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us