[llvm] [Object][ELF] Outline section-content validation errors (PR #202758)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 10 08:03:31 PDT 2026
jh7370 wrote:
> Thanks for taking a look!
>
> > My first immediate thought is: how are you going to prevent this regressing?
>
> Great question. My instinct would be to start collecting binary size metrics in CI so we can at least warn on PRs if they inadvertently regress these metrics, but of course that would be a bigger project and require a bit of cultural buy-in for binary size being something we care about.
You'd have difficulty distinguishing increases because "we need to do more stuff" from "we need to do the same stuff but differently", I fear. Indeed, I'd be somewhat surprised if the gain in this code isn't outweighed by new code being added within a matter of months, if not weeks, because the tools gain new functionality all the time, so it feels like a bit of a losing battle in my opinion, at least for minor improvements like this (there may be other cases where the gain is more significant).
> > The size gains you've discussed are also tiny. Instinctively, my feeling is that this isn't worth the reduction in readability, as a result.
>
> This particular change of 100KB is fairly small. [I had an agent look across the codebase and there are many similar opportunities](https://github.com/llvm/llvm-project/issues/202616); in aggregate the potential win is fairly large (30MB+). The nature of this is that there are some targeted changes that save 500KB+ and a slew of smaller changes that add up. (Many of the PRs linked there are still in draft as they need cleanup, some are likely overly complex and not worth it, etc. But hopefully the broader point makes sense!)
Right, they might add up for a noticeable size gain, but there's also a cumulative impact on the readability etc of the code. I think we have to judge each change on its own individual merits, in this context.
You've already noted the cultural change required though. I think this will be a hard sell outside the realms of those companies where code size is actually important to them (whether that is a significant enough proportion of the community is obviously up for debate and would be one of the reasons for an RFC).
https://github.com/llvm/llvm-project/pull/202758
More information about the llvm-commits
mailing list