-qlistfmt
Pragma equivalent
None.
Purpose
Creates a report in XML or HTML format to help you find optimization opportunities.
Syntax
.-xml--. >>- -q--listfmt=--+-html-+--+-------------------------------------+->< | .-:----------------------------. | | V | | '-=----+-contentSelectionList-----+-+-' +-filename=--filename------+ +-version=--version number-+ '-stylesheet=--filename----'
Defaults
This option is off by default. If none of the contentSelectionList suboptions is specified, all available report information is produced. For example, specifying -qlistfmt=xml is equivalent to -qlistfmt=xml=all.
Parameters
- xml | html
- Instructs the compiler to generate the report in XML or HTML format. If an XML report has been generated before, you can convert the report to the HTML format using the genhtml command. For more information about this command, see genhtml.
- contentSelectionList
- The following suboptions provide a filter to limit the type and
quantity of information in the report:
- data | nodata
- Produces data reorganization information.
- inlines | noinlines
- Produces inlining information.
- pdf | nopdf
- Produces profile-directed feedback information.
- transforms | notransforms
- Produces loop transformation information.
- all
- Produces all available report information.
- none
- Does not produce a report.
- filename
- Specifies the name of the report file. One file is produced during
the compile phase, and one file is produced during the IPA link phase.
If no filename is specified, a file with the suffix .xml or .html is
generated in a way that is consistent with the rules of name generation
for the given platform. For example, if the foo.c file
is compiled, the generated XML files are foo.xml from
the compile step and a.xml from the link step. Note: If you compile and link in one step and use this suboption to specify a file name for the report, the information from the IPA link step will overwrite the information generated during the compile step.The same will be true if you compile multiple files using the filename suboption. The compiler creates an report for each file so the report of the last file compiled will overwrite the previous reports. For example,
will result in only one report, abc.xml based on the compilation of the last file myfile3.c.xlc -qlistfmt=xml=all:filename=abc.xml -O3 myfile1.c myfile2.c myfile3.c
- stylesheet
- Specifies the name of an existing XML stylesheet for which an xml-stylesheet directive
is embedded in the resulting report. The default behavior is to not
include a stylesheet. The stylesheet supplied with XL C/C++ is xlstyle.xsl. This
stylesheet renders the XML report to an easily read format when the
report is viewed through a browser that supports XSLT.
To view the XML report created with the stylesheet suboption, you must place the actual stylesheet (xlstyle.xsl) and the XML message catalog (XMLMessages-locale.xml where locale refers to the locale set on the compilation machine) in the path specified by the stylesheet suboption. The stylesheet and message catalog are installed in the /opt/ibm/xlC/16.1.0/listings/ directory.
For example, if a.xml is generated with stylesheet=xlstyle.xsl, both xlstyle.xsl and XMLMessages-locale.xml must be in the same directory as a.xml, before you can properly view a.xml with a browser.
- version
- Specifies the major version of the content that will be generated. If you have written a tool that requires a certain version of this report, you must specify the version.
- For example, IBM® XL C/C++ for Linux, V16.1 creates reports at XML v1.1. If you have written a tool to consume these reports, specify version=v1.
Usage
The information produced in the report by the -qlistfmt option depends on which optimization options are used to compiler the program.
- When you specify both -qlistfmt and an option that enables inlining such as -finline-functions(-qinline), the report shows which functions were inlined and why others were not inlined.
- When you specify both -qlistfmt and an option
that enables loop unrolling, the report contains a summary of how
program loops are optimized. The report also includes diagnostic information
about why specific loops cannot be vectorized. To make -qlistfmt generate
information about loop transformations, you must also specify at least
one of the following options:
- -qhot
- -qsmp
- -O3 or higher
- When you specify both -qlistfmt and an option
that enables parallel transformations, the report contains information
about parallel transformations. For -qlistfmt to
generate information about parallel transformations or parallel performance
messages, you must also specify at least one of the following options:
- -qsmp
- -O5
- -qipa=level=2
- When you specify both -qlistfmt and -qpdf, which enables profiling, the report contains information about call and block counts and cache misses.
- When you specify both -qlistfmt and an option that produces data reorganizations such as -qipa=level=2, the report contains information about those reorganizations.
Predefined macros
None.
Examples
xlc -qhot -O3 -qlistfmt=xml=transforms myprogram.c
xlc -finline-functions -qlistfmt=xml=inlines myprogram.c