[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 14:23:37 PST 2025


wlei-llvm wrote:

> > 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?
> 
> Sorry for the delay in response. This is basically my concern. PGO-analysis-map was merged into SHT_LLVM_BB_ADDR_MAP because they both describe the MachineBasicBlocks within a function. However, the proposed use-case is about a function-level information which may as well be extended with other information (e.g., number of loads/stores/calls within a function) later. Even if we ever need to join this information with BBAddrMap we can still do so by joining the two section's data.
> 
> > Though if we go this way, I would make it more general use(perhaps name it SHT_LLVM_PGO_FUNC_ANALYSIS_MAP indicating it's for all function-level PGO feature
> 
> I would say even more general like SHT_LLVM_FUNC_ADDR_MAP or simply SHT_LLVM_FUNC_MAP is appropriate. You don't want to limit it to PGO information.

Sounds good not to limit to PGO info, I will give a try with that. Thanks!

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


More information about the llvm-commits mailing list