# qopt-report-phase, Qopt-report-phase

Specifies one or more optimizer phases for which optimization reports are generated.

## Syntax

Linux: | -qopt-report-phase[=list]

macOS: | -qopt-report-phase[=list]

Windows: | /Qopt-report-phase[:list]

## Arguments

list | (Optional) Specifies one or more phases to generate reports for. If you specify more than one phase, they must be separated with commas. The values you can specify are:
cg | The phase for code generation
ipo | The phase for Interprocedural Optimization
loop | The phase for loop nest optimization
openmp | The phase for OpenMP
par | The phase for auto-parallelization
pgo | The phase for Profile Guided Optimization
tcollect | The phase for trace collection
vec | The phase for vectorization
all | All optimizer phases. This is the default if you do not specify list.

## Default

OFF | No optimization report is generated.

## Description

This option specifies one or more optimizer phases for which optimization reports are generated.

For certain phases, you also need to specify other options:

- If you specify phase cg, you must also specify option O1, O2 (default), or O3.

- If you specify phase ipo, you must also specify option [Q]ipo.

- If you specify phase loop, you must also specify option O2 (default) or O3.

- If you specify phase openmp, you must also specify option [q or Q]openmp.

- If you specify phase par, you must also specify option [Q]parallel.

- If you specify phase pgo, you must also specify option [Q]prof-use.

- If you specify phase tcollect, you must also specify option [Q]tcollect.

- If you specify phase vec, you must also specify option O2 (default) or O3. If you are interested in explicit vectorization by OpenMP* SIMD, you must also specify option [q or Q]openmp.

To find all phase possibilities, specify option [q or Q]opt-report-help.

If you use this option, you do not have to specify option [q or Q]opt-report.

However, if you want to get more details for each phase, specify option [q or Q]opt-report=n along with this option and indicate the level of detail you want by specifying an appropriate value for n. (See also the Example section below.)

When optimization reporting is enabled, the default is -qopt-report-phase=all (Linux* or macOS*) or /Qopt-report-phase:all (Windows*).

## IDE Equivalent

Visual Studio: Diagnostics > Optimization Diagnostic Phase

Eclipse: Compilation Diagnostics > Optimization Diagnostic Phase

Xcode: Diagnostics > Optimization Diagnostic Phase

## Alternate Options

None

## Example

The following shows examples of the details you may receive when you specify one of the optimizer phases and a particular level (n) for option [q or Q]opt-report. Note that details may change in future releases.

Optimizer phase | The level specified in option[q or Q]opt-report | Description
--- | --- | ---
cg | 1 | Generates a list of which intrinsics were lowered and which memcall optimizations were performed.
ipo | 1 | For each compiled routine, generates a list of the routines that were inlined into the routine, called directly by the routine, and whose calls were deleted.
| 2 | Generates level 1 details, values for important inlining command line options, and a list of the routines that were discovered to be dead and eliminated.
| 3 | Generates level 2 details, whole program information, the sizes of inlined routines, and the reasons routines were not inlined.
| 4 | Generates level 3 details, detailed footnotes on the reasons why routines are not inlined, and what action the user can take to get them inlined.
loop | 1 | Reports high-level details about which optimizations have been performed on the loop nests (along with the line number). Most of the loop optimizations (like fusion, unroll, unroll & jam, collapsing, rerolling etc) only support this level of detail.
| 2 | Generates level 1 details, and provides more detail on the metrics and types of references (like prefetch distance, indirect prefetches etc) used in optimizations. Only a few optimizations (like prefetching, loop classification framework etc) support these extra details.
openmp | 1 | Reports loops, regions, sections, and tasks successfully parallelized.
| 2 | Generates level 1 details, and messages indicating successful handling of master constructs, single constructs, critical constructs, ordered constructs, atomic pragmas, and so forth.
par | 1 | Reports which loops were parallelized.
| 2 | Generates level 1 details, and reports which loops were not parallelized along with a short reason.
| 3 | Generates level 2 details, and prints the memory locations that are categorized as private, shared, reduction, etc..
| 4 | For this phase, this is the same as specifying level 3.
| 5 | Generates level 4 details, and dependency edges that inhibit parallelization.
pgo | 1 | During profile feedback, generates report status of feedback (such as, profile used, no profile available, or unable to use profile) for each routine compiled.
| 2 | Generates level 1 details, and reports which value profile specializations took place for indirect calls and arithmetic operations.
| 3 | Generates level 2 details, and reports which indirect calls had profile data, but did not meet the internal threshold limits for the percentage or execution count.
tcollect | 1 | Generates a list of routines and whether each was selected for trace collection.
vec | 1 | Reports which loops were vectorized.
| 2 | Generates level 1 details and reports which loops were not vectorized along with short reason.
| 3 | Generates level 2 details, and vectorizer loop summary information.
| 4 | Generates level 3 details, and greater detail about vectorized and non-vectorized loops.
| 5 | Generates level 4 details, and details about any proven or assumed data dependences.

Parent topic: Optimization Report Options

## See Also

qopt-report, Qopt-report compiler option
qopt-report-help, Qopt-report-help compiler option