[PATCH] D138847: MC/DC in LLVM Source-Based Code Coverage: llvm-cov visualization

Gines Salar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 13 02:34:47 PDT 2023


Ibnmardanis24 added inline comments.


================
Comment at: llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h:238
+    /// A Branch Region can be extended to include IDs to facilitate MC/DC.
+    MCDCBranchRegion
   };
----------------
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.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138847/new/

https://reviews.llvm.org/D138847



More information about the llvm-commits mailing list