From 7ead2d8c7e9114b3f23666209a1654939987cb30 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Thu, 13 Jun 2024 20:09:02 +0900 Subject: [MC/DC][Coverage] Loosen the limit of NumConds from 6 (#82448) By storing possible test vectors instead of combinations of conditions, the restriction is dramatically relaxed. This introduces two options to `cc1`: * `-fmcdc-max-conditions=32767` * `-fmcdc-max-test-vectors=2147483646` This change makes coverage mapping, profraw, and profdata incompatible with Clang-18. - Bitmap semantics changed. It is incompatible with previous format. - `BitmapIdx` in `Decision` points to the end of the bitmap. - Bitmap is packed per function. - `llvm-cov` can understand `profdata` generated by `llvm-profdata-18`. RFC: https://discourse.llvm.org/t/rfc-coverage-new-algorithm-and-file-format-for-mc-dc/76798 --- llvm/unittests/ProfileData/CoverageMappingTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/unittests/ProfileData/CoverageMappingTest.cpp') diff --git a/llvm/unittests/ProfileData/CoverageMappingTest.cpp b/llvm/unittests/ProfileData/CoverageMappingTest.cpp index f063a33..ef14767 100644 --- a/llvm/unittests/ProfileData/CoverageMappingTest.cpp +++ b/llvm/unittests/ProfileData/CoverageMappingTest.cpp @@ -872,7 +872,7 @@ TEST_P(CoverageMappingTest, non_code_region_bitmask) { addCMR(Counter::getCounter(2), "file", 1, 1, 5, 5); addCMR(Counter::getCounter(3), "file", 1, 1, 5, 5); - addMCDCDecisionCMR(0, 2, "file", 7, 1, 7, 6); + addMCDCDecisionCMR(3, 2, "file", 7, 1, 7, 6); addMCDCBranchCMR(Counter::getCounter(0), Counter::getCounter(1), 0, {-1, 1}, "file", 7, 2, 7, 3); addMCDCBranchCMR(Counter::getCounter(2), Counter::getCounter(3), 1, {-1, -1}, @@ -895,7 +895,7 @@ TEST_P(CoverageMappingTest, decision_before_expansion) { addCMR(Counter::getCounter(0), "foo", 3, 23, 5, 2); // This(4:11) was put after Expansion(4:11) before the fix - addMCDCDecisionCMR(0, 2, "foo", 4, 11, 4, 20); + addMCDCDecisionCMR(3, 2, "foo", 4, 11, 4, 20); addExpansionCMR("foo", "A", 4, 11, 4, 12); addExpansionCMR("foo", "B", 4, 19, 4, 20); -- cgit v1.1