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

Sergey Shcherbinin via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 8 21:55:40 PST 2025


SergeyShch01 wrote:

Hi @mingmingl-llvm,
Thanks for following this review.

> 1) maintain backward compatibility for non-typified format reader code path

This should be simple enough - this path includes quite small number of code lines. At some point we could move it to a separate functional block (duplicate code for it) - then it will not need any support any more.

>  2) build consensus so new contributions can properly choose a format to integrate with

This also should be quite simple as non-typfied format has no advantages over typified one. Then typified format can be considered as a default and non-typified one as a legacy format kept for backward compatibility.

>Do you plan to upstream that part of work? Perhaps we could consider landing this change with a basic implementation of that work?

I'm working on this, but I'm not sure about the timeline. And I'll also need to commit other preparatory patches preliminary. Reviewing them all together doesn't seem like a good idea due to the overall size of the changes and their logical independence.

For example, this change introducing a typed section is valuable in itself (aside from the extra demo use case going in addtion to the LBR one), because it fixes an oversight in the original ExtBinary design, which did not allow for the easy introduction of new profile types - in which case people had to invent their own non-generic tricks to do that, rather than using a simple and well-understood, common technique.  With this change, introducing a new profile type will be as simple as introducing a new enumeration element and adding its handling to the switch statement.



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


More information about the llvm-commits mailing list