[llvm] [IR][PGO] Verify the structure of `VP` metadata. (PR #145584)
Snehasish Kumar via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 26 10:17:47 PDT 2025
================
@@ -5026,9 +5026,14 @@ void Verifier::visitProfMetadata(Instruction &I, MDNode *MD) {
Check(mdconst::dyn_extract<ConstantInt>(MDO),
"!prof brunch_weights operand is not a const int");
}
- } else {
- Check(ProfName == "VP", "expected either branch_weights or VP profile name",
+ } else if (ProfName == "VP") {
+ Check(isValueProfileMD(MD),"invalid value profiling metadata",MD);
+ Check(isa<CallBase>(I),
+ "value profiling !prof metadata is expected to be placed on call "
+ "instructions (which may be memops)",
----------------
snehasish wrote:
I didn't follow the memops comment. Can you elaborate?
https://github.com/llvm/llvm-project/pull/145584
More information about the llvm-commits
mailing list