[llvm] [llvm-profgen] Add pgo accuracy metrics (PR #93975)

via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 2 20:07:59 PDT 2024


lifengxiang1025 wrote:

Sorry for late reply.
> 1. Can we not check in a binary? We should be able to generate one with the appropriate data using `yaml2obj` I'm thinking?

Yes, we can. We only need bbaddrmap setcion information in a binary. But for the tool llvm-profgen, i think it's normal to use binary as input.
> 2. I'm also not really sure what this feature lets you test given that you're using a sampling based profile as the reference along with all the classical profile infrastructure within LLVM, and thus won't catch any profile propagation issues in the compiler. Can you give more details on how you plan to integrate this into a workflow?

As @red1bluelost concluded, the main idea is "mapping the perf profile directly to the BBAddrMap graph and using that mapping to compute branch accuracy". We can use this result to show how pgo works and where pgo doesn't work well. 



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


More information about the llvm-commits mailing list