The Intel® Fortran Compiler provides options to generate and manage optimization reports.
-opt_report generates
optimizations report and places it in a file specified in
-opt_report_filefilename.
If -opt_report_file is not specified,
-opt_report directs the report to stderr.
The default is OFF: no reports are generated.
-opt_report_filefilename generates optimizations report and directs it to a file specified in filename.
-opt_report_level{min|med|max} specifies the detail level of the optimizations report. The min argument provides the minimal summary and the max the full report. The default is -opt_report_levelmin.
-opt_report_routine [substring] generates reports from all routines with names containing the substring as part of their name. If [substring ] is not specified, reports from all routines are generated. The default is to generate reports for all routines being compiled.
The compiler can generate reports for an optimizer you specify in the
phase argument of the
-opt_report_phasephase
option.
The option can be used multiple times on the same command line to generate reports for multiple optimizers.
Currently, the reports for the following optimizers are supported:
Optimizer Logical Name |
Optimizer Full Name |
ipo |
Interprocedural Optimizer |
hlo |
High-level Language Optimizer |
ilo |
Intermediate Language Scalar Optimizer |
ecg |
Itanium Compiler Code Generator |
all |
All optimizers |
When one of the above logical names for optimizers are specified all reports from that optimizer will be generated. For example, -opt_report_phaseipo and -opt_report_phaseecg generate reports from the interprocedural optimizer and the code generator.
Each of the optimizers can potentially have specific optimizations within them. Each of these optimizations are prefixed with the optimizer's logical name. For example:
Optimizer_optimization |
Full Name |
ipo_inl |
Interprocedural Optimizer, inline expansion of functions |
ipo_cp |
Interprocedural Optimizer, copy propagation |
hlo_unroll |
High-level Language Optimizer, loop unrolling |
hlo_prefetch |
High-level Language Optimizer, prefetching |
ilo_copy_propagation |
Intermediate Language Scalar Optimizer, copy propagation |
ecg_swp |
Itanium Compiler Code Generator, software pipelining |
The following command generates a report for the Itanium Compiler Code Generator (ecg):
ifort -c -opt_report -opt_report_phase ecg myfile.f
where:
-c tells the compiler to stop at generating the object code, not linking
-opt_report invokes the report generator
-opt_report_phaseecg indicates the phase (ecg) for which to generate the report; the space between the option and the phase is optional.
The entire name for a particular optimization within an optimizer need not be specified in full, just a few characters is sufficient. All optimization reports that have a matching prefix with the specified optimizer are generated. For example, if -opt_report_phase ilo_co is specified, a report from both the constant propagation and the copy propagation are generated.
The -opt_report_help option lists the logical names of optimizers and optimizations that are currently available for report generation.
For IA-32 systems, the reports can be generated for:
ilo
hlo if -O3 is on
ipo if interprocedural optimizer is invoked with -ip or -ipo
all the above optimizers if -O3 and -ip or -ipo options are on
For Itanium-based systems, the reports can be generated for:
ilo
ecg
hlo if -O3 is on
ipo if interprocedural optimizer is invoked with -ip or -ipo
all the above optimizers if -O3 and -ip or -ipo options are on
If hlo or ipo report is requested, but the controlling option (-O3 or -ip--ipo, respectively) is not on, the compiler generates an empty report.