[PATCH] D101780: [CoverageMapping] Handle gaps in counter IDs for source-based coverage

Rich Kadel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 11 14:08:03 PDT 2021


richkadel added a comment.

@vsk - Also, I want to confirm that it is OK to have counters that are incremented (via `instrprof.increment` intrinsic) that are not associated with a code region.

Without a code region, I can't add that counter to the coverage map, so, assuming this is not violating LLVM's assumptions, I guess there may be counter ID gaps.

I'm not sure what clang or swiftc does, but in the Rust FE, I sometimes need to count edges between nodes in the CFG (branches taken, between two blocks) since the target block can be executed from multiple incoming edges.

This seems to work fine so far, but I want to make sure. And my suggested error message (prior comment) is probably not accurate (I now realize).

This stuff is hard to explain :-)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101780



More information about the llvm-commits mailing list