[PATCH] D136211: [llvm-profdata] Check for all duplicate entries in MemOpSize table

Ellis Hoag via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 25 13:50:18 PDT 2022


ellis added inline comments.


================
Comment at: llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp:319
 
-    if (V == LastV) {
+    if (SeenSizeId.count(V)) {
       LLVM_DEBUG(dbgs() << "Invalid Profile Data in Function " << Func.getName()
----------------



================
Comment at: llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp:320
+    if (SeenSizeId.count(V)) {
       LLVM_DEBUG(dbgs() << "Invalid Profile Data in Function " << Func.getName()
+                        << ": Two identical values in MemOp value counts.\n");
----------------
Why not make this a full diagnostic error/warning? Is this something a user could encounter in the wild?


================
Comment at: llvm/test/tools/llvm-profdata/invalid-profile-gen-dup-entries.proftext:4
+# IR level Instrumentation Flag
+# CHECK: warning: invalid profile created
+:ir
----------------
It seems strange that this is emitted as a warning rather than an error. Is there a case where this warning can be safely ignored?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136211/new/

https://reviews.llvm.org/D136211



More information about the llvm-commits mailing list