Our internal customer is asking for this feature. 

They used icc currently, with icc, then can get inline list, prof_used list, 
etc. from the binary. 

The old studio compiler also provided such feature, there was compiler 
commentary section in the binary to record
many of the important compiler transformations along with the line number 
information. 

If there is any performance issue with the application, such information will 
be very useful. Especially for large applications.

Qing


> On Jan 29, 2026, at 05:30, Florian Weimer <[email protected]> wrote:
> 
> * Jakub Jelinek via Gcc:
> 
>> On Thu, Jan 29, 2026 at 09:49:40AM +0100, Richard Biener via Gcc wrote:
>>> On Wed, Jan 28, 2026 at 4:43 PM Qing Zhao via Gcc <[email protected]> wrote:
>>>> Does GCC provide any option to record optimization information, such as 
>>>> inlining, loop transformation,
>>>> profiling consistency, etc into specific sections of binary code?
>>> 
>>> No.
>> 
>> Well, inlining is recorded in debug info.  And I don't see what benefit
>> woiuld be to encode the rest, without source information like that is not
>> really useful and with source around you can always recompile and look for
>> compiler dumps or opt info, debug info provides details how a particular
>> TU has been compiled (with what options etc.).
> 
> It's hard to recompile in a generic fashion because build systems are so
> varied.  Depending on what people are trying to achieve, that's more of
> a theoretical option.
> 
> (Capturing source code so that it becomes available for recompilation
> would be interesting for many other applications, too.)
> 
> Thanks,
> Florian
> 

Reply via email to