================ @@ -938,6 +938,37 @@ struct CounterCoverageMappingBuilder return Counter::getCounter(CounterMap[S]); } + struct BranchCounterPair { ---------------- ornata wrote:
IIUC the point of this pair is given: ``` if (x) { // ... do something } else if (y) { // ... something else } else { // ... another something else } ``` You want to track, _from the perspective of a branch_, how many times it is executed. For example, there will be a `BranchAndCounterPair` for the `if`, the `else if`, and the `else`. Assuming I'm understanding this correctly, I think we could explain this struct like so: ``` /// Structure to track how many times a conditional was executed or skipped over when evaluated at runtime. /// /// E.g. given a conditional like /// /// if (x) {...} /// /// Keep track of the number of times the `if` branch is taken, and the number of times it is not taken. ``` https://github.com/llvm/llvm-project/pull/112702 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits