[llvm] Implements PGOBBAddrMap in Object and ObjectYAML with tests [1/5] (PR #71750)

Micah Weston via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 22 09:38:23 PST 2023


red1bluelost wrote:

> Thanks for addressing my concerns.
> 
> I wonder if there is any benefit in emitting the PGOAnalysis BB entries next to their BBAddrMap counterparts in the section. I see we are using the Metadata field to emit the successor type (used primarily for succinct decoding/encoding), but we probably shouldn't introduce this kind of coupling.
> 
> Here is an alternative: Emit the entire PGOAnalysisMap entry of each function right after its BBAddrMap (NBlocks and Feature are shared). Define and use your own fancy encoding for successor type and count.

I'll try that out. Without packing into Metadata there is no space saved for Branch Probability. But that probably doesn't matter much.

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


More information about the llvm-commits mailing list