[all-commits] [llvm/llvm-project] 7ead2d: [MC/DC][Coverage] Loosen the limit of NumConds fro...

NAKAMURA Takumi via All-commits all-commits at lists.llvm.org
Thu Jun 13 04:09:23 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7ead2d8c7e9114b3f23666209a1654939987cb30
      https://github.com/llvm/llvm-project/commit/7ead2d8c7e9114b3f23666209a1654939987cb30
  Author: NAKAMURA Takumi <geek4civic at gmail.com>
  Date:   2024-06-13 (Thu, 13 Jun 2024)

  Changed paths:
    M clang/docs/SourceBasedCodeCoverage.rst
    M clang/include/clang/Basic/CodeGenOptions.def
    M clang/include/clang/Driver/Options.td
    M clang/lib/CodeGen/CodeGenPGO.cpp
    M clang/lib/CodeGen/CoverageMappingGen.cpp
    M clang/lib/CodeGen/MCDCState.h
    M clang/test/CoverageMapping/branch-constfolded.cpp
    M clang/test/CoverageMapping/logical.cpp
    M clang/test/CoverageMapping/mcdc-class.cpp
    M clang/test/CoverageMapping/mcdc-error-conditions.cpp
    M clang/test/CoverageMapping/mcdc-logical-scalar-ids.cpp
    M clang/test/CoverageMapping/mcdc-logical-stmt-ids-all.cpp
    M clang/test/CoverageMapping/mcdc-logical-stmt-ids.cpp
    M clang/test/CoverageMapping/mcdc-scratch-space.c
    M clang/test/CoverageMapping/mcdc-system-headers.cpp
    M clang/test/Profile/c-mcdc-class.cpp
    M clang/test/Profile/c-mcdc-logicalop-ternary.c
    M clang/test/Profile/c-mcdc-nested-ternary.c
    M clang/test/Profile/c-mcdc-not.c
    M clang/test/Profile/c-mcdc.c
    M llvm/docs/CoverageMappingFormat.rst
    M llvm/docs/LangRef.rst
    M llvm/include/llvm/IR/IntrinsicInst.h
    M llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h
    M llvm/include/llvm/ProfileData/InstrProf.h
    M llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
    M llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
    M llvm/test/Instrumentation/InstrProfiling/inline-data-var-create.ll
    M llvm/test/Instrumentation/InstrProfiling/mcdc.ll
    M llvm/test/tools/llvm-cov/Inputs/mcdc-const-folding.o
    M llvm/test/tools/llvm-cov/Inputs/mcdc-const-folding.proftext
    M llvm/test/tools/llvm-cov/Inputs/mcdc-const.o
    M llvm/test/tools/llvm-cov/Inputs/mcdc-const.proftext
    A llvm/test/tools/llvm-cov/Inputs/mcdc-general-18.o
    A llvm/test/tools/llvm-cov/Inputs/mcdc-general-18.profdata
    M llvm/test/tools/llvm-cov/Inputs/mcdc-general.o
    M llvm/test/tools/llvm-cov/Inputs/mcdc-general.proftext
    M llvm/test/tools/llvm-cov/Inputs/mcdc-macro.o
    M llvm/test/tools/llvm-cov/Inputs/mcdc-macro.proftext
    M llvm/test/tools/llvm-cov/Inputs/mcdc-maxbs.o
    A llvm/test/tools/llvm-cov/mcdc-general-18.test
    M llvm/unittests/ProfileData/CoverageMappingTest.cpp

  Log Message:
  -----------
  [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



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list