[lld] [lld][ELF] Add --print-relax-stats= to emit linker relaxation statistics (PR #193631)
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 23 02:27:23 PDT 2026
smithp35 wrote:
I agree with MaskRay that upstream should be careful about accepting specific analyses, and as relocations by far the most common data structure instance, we shouldn't increase its size.
I'm wondering if there's anything general we can take from this so it does become possible for people to run local stats gathering without needing a downstream patch to lld. For example if we were able to optionally serialise relocation information before and after certain operations then it would be possible to write scripts to derive project-specific stats without altering the main lld code-path.
On the subject of JSON, I agree that in this case plain text would suffice. The subject of a machine readable map file came up again at Euro LLVM as something that embedded tool users were asking for. JSON or YAML would likely be ideal for that. I still think we're some way from developing that as we need a prototype to see what kind of information to put into the JSON file.
https://github.com/llvm/llvm-project/pull/193631
More information about the llvm-commits
mailing list