[llvm] [SHT_LLVM_BB_ADDR_MAP] Add a new PGOAnalysisMap feature to emit dynamic instruction count (PR #119303)

Lei Wang via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 16 13:42:48 PST 2025


wlei-llvm wrote:

> > Alternatively, IIUC, @rlavaee suggested to define a new [extension](https://llvm.org/docs/Extensions.html) to implement function-level PGO analysis features. To do this, it will add a new section and code to ObjectYaml/ llvm-readobj/ Codegen, so I'd like to hear your opinion before we start the implementation.
> 
> So I think the question here is whether the new extension, and resultant code changes, outweighs the cost of supporting the format within the BB Addr map code paths everywhere. Although I helped review things for the BB Addr map support, I don't really recall how complex it was and how much of an impact adding a different "mode" to it would have. Another question to answer is if one or the other modes/formats needs to be extended in some way, will it require the behaviour to be duplicated in both formats? If @rlavaee thinks it would be better for a new section type to be implemented, so that the two can evolve independently and/or so that the handling of each section type is simpler, I've got no objection to that being the way forward.

Thank you for your insights! @jh7370  I guess it would be clearer to make decision if we have the patch with the new extension. I'll try implementing one version, we can compare and decide it later.

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


More information about the llvm-commits mailing list