[PATCH] D116180: [InstrProf] Add single byte coverage mode
Kyungwoo Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 28 15:42:02 PST 2021
kyulee added a comment.
I will come back to review this code later once the dependent patches land.
In the high-level discussion, this is really a function coverage because it probes the function header, but the flag or terminology inter-mixed just a coverage.
For the code (not just function) coverage, I think we might want to have an option to inject this probe in the block edge as well so that the default/code-coverage can be fully functional.
Of course, this could be a follow-up, but just head-up on how this can be factored in this design.
================
Comment at: compiler-rt/test/profile/instrprof-coverage.c:1
+// RUN: %clang_pgogen -mllvm -pgo-coverage-instrumentation %s -o %t.out
+// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t.out
----------------
Can you add a test case using the debug data `-debug-info`?
================
Comment at: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:478
+ M, /*IsCS=*/true, PGOInstrumentEntry,
+ DebugInfoCorrelate, CoverageInstrumentation));
return false;
----------------
Hmm. It appears to continue adding extra parameters.
I wonder whether we can refactor this given more features are coming.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116180/new/
https://reviews.llvm.org/D116180
More information about the llvm-commits
mailing list