[llvm-branch-commits] [llvm] [InstrProf] Deduplicate VP values (PR #196649)
Aiden Grossman via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu May 14 06:38:53 PDT 2026
================
@@ -1359,14 +1359,43 @@ void annotateValueSite(Module &M, Instruction &Inst,
// Value Profile Data
uint32_t MDCount = MaxMDCount;
+ // Zero values might occur multiple times (e.g., multiple functions that
----------------
boomanaiden154 wrote:
`PGOUseFunc::annotateValueSites` is probably the only one that would need to be fixed, but there's not a convenient way to do it. We would need to construct a new array for the data in that case after filtering and then pass it around rather than directly skipping things during iteration like here.
My TODO to move this earlier in InstrProf.cpp would end up handling this, but there's the mentioned problems around error handling.
https://github.com/llvm/llvm-project/pull/196649
More information about the llvm-branch-commits
mailing list