[clang] [llvm] [PseudoProbe] Mix and reorder block and call probe ID in lexical order (PR #75092)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 4 16:09:07 PST 2024


WenleiHe wrote:

> Agreed with this concern. To do this, we probably also need a flag in the binary, because otherwise if we use the new toolchain for prof-gen but the binary built on the old toolchain, we then would generate a profile with this flag on but the order is the old one. My understanding is the (probe) version of profile should line up with the version of the binary. Maybe make this more general, we can introduce a "pseudo_probe_version" thing, similar to instrPGO https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/ProfileData/InstrProf.h#L996 . It can be useful if we want to update other pseudo probe formats in future.

Versioning is one way to do this. Alternatively, we should be able to detect the case during llvm-profgen time when all call site probe and block probe ids are separated, which can then be used to set flags? 

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


More information about the cfe-commits mailing list