Storing optimization choices in an ELF section

Ludovic Courtès
Fri Jun 2 11:14:00 GMT 2017


Andrew Haley <> skribis:

> On 01/06/17 13:45, Ludovic Courtès wrote:
>> A proprietary compiler stores information about optimizations it has
>> made (loop unrolling, vectorization, etc.) in a ‘.debug_opt_report’ ELF
>> section.  This information can later be exploited by performance
>> analysis tools, which can help understand performance.
>> Has there been any thought on implementing something similar in GCC?
> It's all in the -fverbose-asm output.  It would be almost trivial
> to output that into a .debug_opt_report section.

Yes (modulo issues such as finding a compact and stable representation I
suppose), and it would be a useful tool.


More information about the Gcc-help mailing list