[llvm] [IR][PGO] Verify the structure of `VP` metadata. (PR #145584)
Mircea Trofin via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 27 14:58:32 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)",
----------------
mtrofin wrote:
it was WIP. Fixed.
https://github.com/llvm/llvm-project/pull/145584
More information about the llvm-commits
mailing list