[PATCH] D138847: MC/DC in LLVM Source-Based Code Coverage: llvm-cov visualization
Gulfem Savrun Yeniceri via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 13 12:19:54 PDT 2023
gulfem added a comment.
Your commit message mentioned: "Fuchsia is not yet supported."
Is the anything that stops us generating `MC/DC coverage` in `Fuchsia` or is it just not tested yet?
================
Comment at: llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h:238
+ /// A Branch Region can be extended to include IDs to facilitate MC/DC.
+ MCDCBranchRegion
};
----------------
alanphipps wrote:
> Ibnmardanis24 wrote:
> > gulfem wrote:
> > > What is the purpose of `MCDCBranchRegion`? We already have branch regions, and why adding `MCDCDecisionRegion` is not enough?
> > My understanding is that MCDCDecisionRegion is used for storing the set of minimum condition permutations required for complete MC/DC coverage. This is fundamentally different from BranchRegion's purpose. BranchRegion records the path taken, rather than the condition set that produced it. There is an interesting interaction between the 2, which I believe to be the reason for MCDCBranchRegion: when on a given path, subsequent branching could be conditioned by the particular permutation that allowed it, meaning the path taken downstream could be guessed from MC/DC information. This condition projection can only be done when on MC/DC mode and it also requires more space to exercise. Therefore, this should justify having BranchRegion and MCDCBranchRegion separated.
> Yes there are three region types that apply:
>
> 1.) "BranchRegion" applies to BranchCoverage when MC/DC is not enabled or to single conditions (where MC/DC doesn't make sense) and simply represents the True/False Counters for a condition. This is also maintained for backward compatibility in the format. It requires less data than MCDCBranchRegion.
>
> 2.) "MCDCBranchRegion" extends "BranchRegion" to also apply condition IDs to the condition and is only used when MC/DC is enabled and used.
>
> 3.) "MCDCDecisionRegion" is intended to apply to the entire set of conditions in the boolean expression, supplying the source begin/end for the whole region, and supply bitmap index used to track the test vectors for the region.
>
> llvm-cov associates MCDCDecisionRegion with a set of MCDCBranchRegions based on its tie to the source code.
Thanks for the explanation!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138847/new/
https://reviews.llvm.org/D138847
More information about the llvm-commits
mailing list