[llvm] Introduction of typified section in ExtBinary format (PR #166553)
Sergey Shcherbinin via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 2 02:38:23 PDT 2026
SergeyShch01 wrote:
> So ProfileAnchor today would be either SourceLocation (Function, LineOffset , Discriminator) or Probe (Id, Discriminator). Without a common layer, that consumer would need to repeat the inline-context lookup, DILocation conversion, discriminator policy, missing-debug-info handling, and the decision about what to do when one source location matches multiple loads (in your case).
I agree with this direction. The currently scattered logic could be encapsulated in a common ProfileAnchor class. This would be a noticeable refactoring, but it should pay off as more profile types are added.
In my load-profile work, I addressed multiple loads on the same source line by extending the existing AddDiscriminators pass to assign them distinct discriminators. This extension is opt-in and enabled through an option.
https://github.com/llvm/llvm-project/pull/166553
More information about the llvm-commits
mailing list