Use the options listed in this topic to generate reports on the following optimizers.
Interprocedural Optimization (IPO)
Profile-guided Optimization (PGO)
High Performance Optimizer (HPO)
High-level Optimization (HLO)
Intermediate Language Scalar Optimization (ILO)
Software Pipelining (SWP)
Specify an optimizer phase by passing the phase argument to the -opt-report-phase (Linux* and Mac OS* X) or /Qopt-report-phase (Windows*) option.
Optimizer Phase |
Supported Optimizer |
---|---|
pgo |
Profile-guided Optimizer |
ipo |
Interprocedural Optimizer |
ilo |
Intermediate Language Scalar Optimizer |
hpo |
High Performance Optimizer |
hlo |
High-level Optimizer |
ecg |
Itanium® Compiler Code Generator Mac OS X: This phase is not supported. |
ecg_swp |
The software pipelining component of the Code Generator phase (Windows and Linux systems using IA-64 architecture only) |
all |
All optimizers supported on the architecture. This is not recommended; the resulting output can be too extensive to be useful. Experiment with targeted phase reports first. |
Reports Available by Architecture and Option
IA-32, Intel® 64, and IA-64 architectures:
ilo and pgo
hpo and hlo: For IA-32 architecture, supported with -x (Linux and Mac OS X) or /Qx (Windows) option.
For Intel® 64 architecture, supported with -O2 (Linux and Mac OS X) or /O2 (Windows) option. For IA-32 and Intel® 64 architectures, a subset of these optimizations are enabled at default optimization level (O2). For IA-64 architecture, supported with -O3 (Linux and Mac OS X) or /O3 (Windows) option.
ipo: Interprocedural optimization is enabled for -O2 (Linux and Mac OS X) or /O2 (Windows) option or above.
all: All of the above.
IA-64 architecture only:
ecg
Running the Reports
Use syntax similar to the following to run the compiler reports.
Operating System |
Sample Syntax |
---|---|
Linux and Mac OS X |
icpc -c -opt-report 2 -opt-report-phase=all sample.cpp |
Windows |
icl /c /Qopt-report:2 /Qopt-report-phase:all sample.cpp |
The sample command instructs the compiler to generate a report and send the results to stderr and specifies the reports should include information about all available optimizers. In most cases, specifying all as the phase will generate too much information to be useful.
If you want to capture the report in an output file instead of sending it to stderr, specify -opt-report-file (Linux and Mac OS X) or /Qopt-report-file (Windows) and indicate an output file name. If you do not want the compiler to invoke the linker, specify -c (Linux and Mac OS X) or /c (Windows) >as shown in the sample syntax above; by specifying the option you instruct the compiler to stop after generating object code and reporting the results.
See Compiler Reports Quick Reference for information about how to use the report related options.
When you specify a phase name, as shown above, the compiler generates all reports from that optimizer. The option can be used multiple times on the same command line to generate reports for multiple optimizers. For example, for if you specified -opt-report-phase ipo -opt-report-phase hlo (Linux and Mac OS X) or /Qopt-report-phase ipo /Qopt-report-phase hlo (Windows) the compiler generates reports from the interprocedural optimizer and the high-level optimizer code generator.
You do not need to fully specify an optimizer name in the command; in many cases, the first few characters should suffice to generate reports; however, all optimization reports that have a matching prefix are generated.
Each of the optimizer logical names supports many specific, targeted optimizations within them. Each of the targeted optimizations have the prefix of the optimizer name. Enter -opt-report-help (Linux and Mac OS X) or /Qopt-report-help (Windows) to list the names of optimizers that are supported. The following table lists some examples:
Optimizer |
Description |
---|---|
ipo_inl |
Interprocedural Optimizer, inline expansion of functions |
ipo_cp |
Interprocedural Optimizer, constant propagation |
hlo_unroll |
High-level Optimizer, loop unrolling |
hlo_prefetch |
High-level Optimizer, prefetching |
Viewing the Optimization Reports Graphically (Linux)
To generate the graphical report display, you must compile the application using the following optimization reports options, at a minimum: -opt-report-phase and -opt-report-file.
As with the text-based reports, the graphical report information can be generated on all architectures.