Use the options listed in this topic to generate reports on the following optimizers.
Interprocedural Optimization (IPO)
Profile-guided Optimization (PGO)
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*) or /Qopt-report-phase (Windows*) option.
Optimizer Phase |
Supported Optimizer |
---|---|
pgo |
Profile-guided Optimizer |
ipo |
Interprocedural Optimizer |
ilo |
Intermediate Language Scalar Optimizer |
hlo |
High-level Optimizer |
ecg |
Itanium® Compiler Code Generator Mac OS: This phase is not supported. |
all |
All optimizers supported on the architecture. This is not recommended; the resulting output can be too extensive to be useful. Experiment with targeted phases reports first. |
The following table shows the optimizers and reports available by architecture.
Architecture |
Supported Optimizers |
---|---|
IA-32, Intel® 64, and |
|
IA-64 |
|
Use syntax similar to the following to generate reports.
Platform |
Sample Syntax |
---|---|
Linux and Mac OS |
icpc -c -opt-report 2 -opt-report-phase all sample.cpp |
Windows |
icl /c /Qopt-report:2 /Qopt-report-phase:all sample.cpp |
Linux and Mac OS: The space between
the option and the phase is optional.
Windows: The colon between the option and phase is optional.
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) 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) 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) 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) 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 |
ecg_swp |
Itanium®-based Compiler Code Generator, software pipelining |
In addition to the text-based optimization reports, the Intel compiler can now generate the necessary information to allow the OptReport feature in Intel® VTune™ Linux 8.x to display the optimization reports graphically. See the VTune™ Performance Analyzer documentation for details.
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.