[all-commits] [llvm/llvm-project] 9f2967: [Coverage] Add support for Branch Coverage in LLVM...

Alan Phipps via All-commits all-commits at lists.llvm.org
Tue Jan 5 07:58:40 PST 2021


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9f2967bcfe2f7d1fc02281f0098306c90c2c10a5
      https://github.com/llvm/llvm-project/commit/9f2967bcfe2f7d1fc02281f0098306c90c2c10a5
  Author: Alan Phipps <a-phipps at ti.com>
  Date:   2021-01-05 (Tue, 05 Jan 2021)

  Changed paths:
    M clang/docs/SourceBasedCodeCoverage.rst
    M clang/lib/CodeGen/CGExprScalar.cpp
    M clang/lib/CodeGen/CGStmt.cpp
    M clang/lib/CodeGen/CodeGenFunction.cpp
    M clang/lib/CodeGen/CodeGenFunction.h
    M clang/lib/CodeGen/CodeGenPGO.cpp
    M clang/lib/CodeGen/CoverageMappingGen.cpp
    M clang/lib/CodeGen/CoverageMappingGen.h
    A clang/test/CoverageMapping/branch-constfolded.cpp
    A clang/test/CoverageMapping/branch-logical-mixed.cpp
    A clang/test/CoverageMapping/branch-macros.cpp
    A clang/test/CoverageMapping/branch-mincounters.cpp
    A clang/test/CoverageMapping/branch-templates.cpp
    M clang/test/CoverageMapping/continue.c
    M clang/test/CoverageMapping/coroutine.cpp
    M clang/test/CoverageMapping/if.cpp
    M clang/test/CoverageMapping/label.cpp
    M clang/test/CoverageMapping/logical.cpp
    M clang/test/CoverageMapping/loopmacro.c
    M clang/test/CoverageMapping/loops.cpp
    M clang/test/CoverageMapping/macro-expansion.c
    M clang/test/CoverageMapping/macro-expressions.cpp
    M clang/test/CoverageMapping/macros.c
    M clang/test/CoverageMapping/macroscopes.cpp
    M clang/test/CoverageMapping/moremacros.c
    M clang/test/CoverageMapping/return.c
    M clang/test/CoverageMapping/switch.cpp
    M clang/test/CoverageMapping/switchmacro.c
    M clang/test/CoverageMapping/test.c
    M clang/test/CoverageMapping/unreachable-macro.c
    M clang/test/CoverageMapping/while.c
    M clang/test/Profile/Inputs/c-general.proftext
    A clang/test/Profile/branch-logical-mixed.cpp
    A clang/test/Profile/branch-profdup.cpp
    M clang/test/Profile/c-general.c
    M clang/test/Profile/cxx-lambda.cpp
    M compiler-rt/include/profile/InstrProfData.inc
    M llvm/docs/CommandGuide/llvm-cov.rst
    M llvm/docs/CoverageMappingFormat.rst
    M llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h
    M llvm/include/llvm/ProfileData/InstrProf.h
    M llvm/include/llvm/ProfileData/InstrProfData.inc
    M llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
    M llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
    M llvm/lib/ProfileData/Coverage/CoverageMappingWriter.cpp
    M llvm/test/tools/llvm-cov/Inputs/binary-formats.canonical.json
    A llvm/test/tools/llvm-cov/Inputs/branch-c-general.o32l
    A llvm/test/tools/llvm-cov/Inputs/branch-c-general.proftext
    A llvm/test/tools/llvm-cov/Inputs/branch-logical-mixed.o32l
    A llvm/test/tools/llvm-cov/Inputs/branch-logical-mixed.proftext
    A llvm/test/tools/llvm-cov/Inputs/branch-macros.o32l
    A llvm/test/tools/llvm-cov/Inputs/branch-macros.proftext
    A llvm/test/tools/llvm-cov/Inputs/branch-showBranchPercentage.o32l
    A llvm/test/tools/llvm-cov/Inputs/branch-showBranchPercentage.proftext
    A llvm/test/tools/llvm-cov/Inputs/branch-templates.o32l
    A llvm/test/tools/llvm-cov/Inputs/branch-templates.proftext
    M llvm/test/tools/llvm-cov/Inputs/showExpansions.json
    A llvm/test/tools/llvm-cov/branch-c-general.c
    A llvm/test/tools/llvm-cov/branch-export-json.test
    A llvm/test/tools/llvm-cov/branch-export-lcov.test
    A llvm/test/tools/llvm-cov/branch-logical-mixed.cpp
    A llvm/test/tools/llvm-cov/branch-macros.cpp
    A llvm/test/tools/llvm-cov/branch-noShowBranch.test
    A llvm/test/tools/llvm-cov/branch-showBranchPercentage.c
    A llvm/test/tools/llvm-cov/branch-templates.cpp
    M llvm/test/tools/llvm-cov/ignore-filename-regex.test
    M llvm/tools/llvm-cov/CodeCoverage.cpp
    M llvm/tools/llvm-cov/CoverageExporterJson.cpp
    M llvm/tools/llvm-cov/CoverageExporterLcov.cpp
    M llvm/tools/llvm-cov/CoverageReport.cpp
    M llvm/tools/llvm-cov/CoverageSummaryInfo.cpp
    M llvm/tools/llvm-cov/CoverageSummaryInfo.h
    M llvm/tools/llvm-cov/CoverageViewOptions.h
    M llvm/tools/llvm-cov/SourceCoverageView.cpp
    M llvm/tools/llvm-cov/SourceCoverageView.h
    M llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp
    M llvm/tools/llvm-cov/SourceCoverageViewHTML.h
    M llvm/tools/llvm-cov/SourceCoverageViewText.cpp
    M llvm/tools/llvm-cov/SourceCoverageViewText.h

  Log Message:
  -----------
  [Coverage] Add support for Branch Coverage in LLVM Source-Based Code Coverage

This is an enhancement to LLVM Source-Based Code Coverage in clang to track how
many times individual branch-generating conditions are taken (evaluate to TRUE)
and not taken (evaluate to FALSE).  Individual conditions may comprise larger
boolean expressions using boolean logical operators.  This functionality is
very similar to what is supported by GCOV except that it is very closely
anchored to the ASTs.

Differential Revision: https://reviews.llvm.org/D84467




More information about the All-commits mailing list