[all-commits] [llvm/llvm-project] fc697f: [Coverage] Introduce `getBranchCounterPair()`. NFC.

NAKAMURA Takumi via All-commits all-commits at lists.llvm.org
Thu Oct 17 05:35:34 PDT 2024


  Branch: refs/heads/users/chapuni/cov/single/getpair
  Home:   https://github.com/llvm/llvm-project
  Commit: fc697f04fd6c9f3c217ce04e3f1dd082c1f1a705
      https://github.com/llvm/llvm-project/commit/fc697f04fd6c9f3c217ce04e3f1dd082c1f1a705
  Author: NAKAMURA Takumi <geek4civic at gmail.com>
  Date:   2024-10-17 (Thu, 17 Oct 2024)

  Changed paths:
    M clang/lib/CodeGen/CoverageMappingGen.cpp

  Log Message:
  -----------
  [Coverage] Introduce `getBranchCounterPair()`. NFC.

This aggregates the generation of branch counter pair as `ExecCnt` and
`SkipCnt`, to aggregate `CounterExpr::subtract`. At the moment:

- This change preserves the behavior of
  `llvm::EnableSingleByteCoverage`. Almost of SingleByteCoverage will
  be cleaned up by coming commits.

- `getBranchCounterPair()` is not called in
  `llvm::EnableSingleByteCoverage`. I will implement the new behavior
  of SingleByteCoverage in it.

- `IsCounterEqual(Out, Par)` is introduced instead of
  `Counter::operator==`. Tweaks would be required for the comparison
  for additional counters.

- Braces around `assert()` is intentional. I will add a statement there.

https://discourse.llvm.org/t/rfc-integrating-singlebytecoverage-with-branch-coverage/82492



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list