[clang] [llvm] [Coverage] Introduce "partial fold" on BranchRegion (PR #112694)
Jessica Paquette via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 17 23:56:49 PDT 2024
================
@@ -719,10 +720,10 @@ struct FunctionRecord {
Region.Kind == CounterMappingRegion::MCDCBranchRegion) {
CountedBranchRegions.emplace_back(Region, Count, FalseCount,
HasSingleByteCoverage);
- // If both counters are hard-coded to zero, then this region represents a
+ // If either counters is hard-coded to zero, then this region represents a
// constant-folded branch.
- if (Region.Count.isZero() && Region.FalseCount.isZero())
- CountedBranchRegions.back().Folded = true;
+ CountedBranchRegions.back().TrueFolded = Region.Count.isZero();
----------------
ornata wrote:
rename Region.Count to Region.TrueCount?
https://github.com/llvm/llvm-project/pull/112694
More information about the llvm-commits
mailing list