diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2024-06-13 20:09:02 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-13 20:09:02 +0900 |
commit | 7ead2d8c7e9114b3f23666209a1654939987cb30 (patch) | |
tree | c1a590efc30fbd8439a721e5c2d5b6feec337a84 /llvm/unittests/ProfileData/CoverageMappingTest.cpp | |
parent | 933d6be8e8c4a81f6409f4daaf704e7f363c6508 (diff) | |
download | llvm-7ead2d8c7e9114b3f23666209a1654939987cb30.zip llvm-7ead2d8c7e9114b3f23666209a1654939987cb30.tar.gz llvm-7ead2d8c7e9114b3f23666209a1654939987cb30.tar.bz2 |
[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
Diffstat (limited to 'llvm/unittests/ProfileData/CoverageMappingTest.cpp')
-rw-r--r-- | llvm/unittests/ProfileData/CoverageMappingTest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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); |