[clang] [compiler-rt] [llvm] [InstrProf] Single byte counters in coverage (PR #75425)

via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 15 12:27:26 PST 2024


================
@@ -1519,38 +1543,53 @@ struct CounterCoverageMappingBuilder
     }
 
     // Create Branch Region around condition.
-    createBranchRegion(S->getCond(), BodyCount,
-                       subtractCounters(CondCount, BodyCount));
+    if (!llvm::EnableSingleByteCoverage)
+      createBranchRegion(S->getCond(), BodyCount,
+                         subtractCounters(CondCount, BodyCount));
----------------
gulfemsavrun wrote:

We are currently interested in enabling single byte counters mode for line coverage. But, if there is any interest, we might consider supporting branch coverage in single byte counters mode as well. Branch coverage is more tricky, though. Because it already inserts additional counters and in order to support single byte counters mode, we need to insert more counters. We need to think about associating counters with the relevant AST nodes for branch coverage.

https://github.com/llvm/llvm-project/pull/75425


More information about the cfe-commits mailing list