[PATCH] D116180: [InstrProf] Add single byte coverage mode
Ellis Hoag via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 27 15:07:11 PST 2022
ellis added inline comments.
================
Comment at: llvm/include/llvm/ProfileData/InstrProf.h:289
+ SingleByteCoverage = 0x10, // Use single byte coverage probes.
+ FunctionEntryOnly = 0x20, // Only instrument the function entry.
+ LLVM_MARK_AS_BITMASK_ENUM(/*LargestValue=*/FunctionEntryOnly)
----------------
snehasish wrote:
> At a glance, this looks similar to the `BB` enum value. If this is coverage only can we make it explicit in the name? Perhaps something like `FunctionEntryCoverageOnly`. IIUC the comment implies "only instrument the function entry for coverage" as opposed to whether the the entry basic block has instrumentation for profiling.
>
> I like the idea of having better naming for the enum values and I'll send out a separate patch renaming the others once this is submitted.
This is actually not for coverage. `FunctionEntryOnly` only instruments the entry basic block, whereas BB guarantees that the entry basic block is instrumented, along with other blocks.
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