[llvm] Introduction of typified section in ExtBinary format (PR #166553)

Mingming Liu via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 2 16:09:07 PST 2025


mingmingl-llvm wrote:

Hi @SergeyShch01, thanks for the continued work and patience. I was catching up on some internal work and then OOO for the past week.

I’ve been reflecting on the overall direction, and I have two thoughts I wanted to discuss with you and the other reviewers before we move forward to discuss more about the implementation. I want to be upfront that I am very open to being convinced otherwise and would really value a second or third opinion from others working in this area.

1. While forward compatibility is nice to have (at a reasonable engineering cost), introducing a format change does add some overhead, for instance, to keep the prior read path work for backward compatibility. In addition, it be easier for future readers to understand how to integrate with the new format with an motivating use case. Is there a motivating use case that will pair with this format change?

2. It looks like the current implementation supports forward compatibility primarily for the core payload section (LBR [^1] ). While this might cover for many use cases , I'm wondering if it'd be more future-proof to use tag-ids (or type-ids) to support forward-compat for the entire SamplePGO binary profile format. Have you considered the feasibility of a more holistic approach? 

In addition, if we want to formally support forward compatibility as a community, it might be good to have a small LLVM `.rst` doc for the profile format and formalize the requirements (e.g., do not re-use a type-id, etc).

[^1]: To be pedantic, the section is really about branch profiles. (Intel) LBR and (AArch64) SPE both work to provide the branch profiles.

https://github.com/llvm/llvm-project/pull/166553


More information about the llvm-commits mailing list