[llvm-branch-commits] [IR] Verify that VP !prof does not have duplicate prof values (PR #193083)

2026-05-17 Thread Aiden Grossman via llvm-branch-commits


@@ -5427,6 +5427,15 @@ void Verifier::visitProfMetadata(Instruction &I, MDNode 
*MD) {
 "VP !prof indirect call or memop size expected to be applied to "
 "CallBase instructions only",
 MD);
+
+DenseSet ProfileValues;
+for (unsigned I = 3; I < MD->getNumOperands(); I += 2) {

boomanaiden154 wrote:

There's some conditions where it bails that I think we still want to 
verify/report a different error. Given that I don't think it makes sense to 
combine the two, especially if we ever want to change behavior in 
`getValueProfDataFromInst`.

https://github.com/llvm/llvm-project/pull/193083
___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [IR] Verify that VP !prof does not have duplicate prof values (PR #193083)

2026-05-09 Thread Aiden Grossman via llvm-branch-commits

boomanaiden154 wrote:

> can the check also be done earlier to the VP meta data creation point -- 
> which allows the error context to be captured.

Can you describe exactly what you have in mind? We could do something where the 
VP metadata gets created in `InstrProf.cpp` like an assertion/error emission, 
but that really shouldn't be getting emitted after 
https://github.com/llvm/llvm-project/pull/196649.

https://github.com/llvm/llvm-project/pull/193083
___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [IR] Verify that VP !prof does not have duplicate prof values (PR #193083)

2026-05-09 Thread David Li via llvm-branch-commits

david-xl wrote:

> > can the check also be done earlier to the VP meta data creation point -- 
> > which allows the error context to be captured.
> 
> Can you describe exactly what you have in mind? We could do something where 
> the VP metadata gets created in `InstrProf.cpp` like an assertion/error 
> emission, but that really shouldn't be getting emitted after #196649.

Ok -- if it is rare, keep it in verifier is fine.

https://github.com/llvm/llvm-project/pull/193083
___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [IR] Verify that VP !prof does not have duplicate prof values (PR #193083)

2026-05-09 Thread David Li via llvm-branch-commits

https://github.com/david-xl approved this pull request.


https://github.com/llvm/llvm-project/pull/193083
___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits