Using compiler reports to diagnose optimization opportunities
You can use the -qlistfmt option to generate a compiler report in XML or HTML format. It provides information about how your program is optimized. You can also use the genhtml utility to convert an existing XML report to HTML format. This information helps you understand your application codes and tune codes for better performance.
The compiler report in XML format can be viewed in a browser that supports XSLT. If you compile with the stylesheet suboption, for example, -qlistfmt=xml=all:stylesheet=xlstyle.xsl, the report contains a link to a stylesheet that renders the XML readable. By reading the report, you can detect opportunities to further optimize your code. You can also create tools to parse this information.
By default, the name of the report is a.xml for XML format, and a.html for HTML format. You can use the -qlistfmt=xml=filename or -qlistfmt=html=filename option to override the default name.
Inline reports
If you compile with -qinline and one of -qlistfmt=xml=inlines, -qlistfmt=html=inlines, -qlistfmt=xml, or -qlistfmt=html, the generated compiler report includes a list of inline attempts during compilation. The report also specifies the type of attempt and its outcome.
- FunctionTooBig - The function is too big to be inlined.
- RecursiveCall - The function is not inlined because it is recursive.
- ProhibitedByUser - Inlining was not performed because of a user-specified pragma or directive.
- CallerIsNoopt - No inlining was performed because the caller was compiled without optimization.
- WeakAndNotExplicitlyInline - The calling function is weak and not marked as inline.
For a complete list of the possible reasons, see the Inline optimization types section of the XML schema help file named XMLContent.html in the /opt/IBM/xlc/13.1.3/listings/ directory. The Japanese and Chinese versions of the help file, XMLContent-Japanese.utf8.html and XMLContent-Chinese.utf8.html, are included in this directory as well.
Loop transformations
- Reasons why a loop cannot be automatically parallelized
- Reasons why a loop cannot be unrolled
- Reasons why SIMD vectorization failed
For a complete list of the possible transformation problems, see the Loop transformation types section of the XML schema help file named XMLContent.html in the /opt/IBM/xlc/13.1.3/listings/ directory.
Data reorganizations
- Array splitting
- Array coalescing
- Array interleaving
- Array transposition
- Memory merge
For each of these reorganizations, the report contains details about the name of the data, file names, line numbers, and the region names.
Profile-directed feedback reports
- Loop iteration counts
- Block and call counts
- Cache misses (if compiled with -qpdf1=level=2)