[all-commits] [llvm/llvm-project] b9d086: [llvm-cov gcov] Compute unmeasured arc counts by K...

Fangrui Song via All-commits all-commits at lists.llvm.org
Tue Sep 8 18:48:19 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b9d086693b5baebc477793af0d86a447bae01b6f
      https://github.com/llvm/llvm-project/commit/b9d086693b5baebc477793af0d86a447bae01b6f
  Author: Fangrui Song <i at maskray.me>
  Date:   2020-09-08 (Tue, 08 Sep 2020)

  Changed paths:
    M compiler-rt/test/profile/Inputs/instrprof-gcov-multiple-bbs-single-line.c.gcov
    M llvm/include/llvm/ProfileData/GCOV.h
    M llvm/lib/ProfileData/GCOV.cpp
    M llvm/test/tools/llvm-cov/gcov-4.7.c
    M llvm/test/tools/llvm-cov/gcov-8.c
    M llvm/test/tools/llvm-cov/gcov-9.c

  Log Message:
  -----------
  [llvm-cov gcov] Compute unmeasured arc counts by Kirchhoff's circuit law

For a CFG G=(V,E), Knuth describes that by Kirchoff's circuit law, the minimum
number of counters necessary is |E|-(|V|-1). The emitted edges form a spanning
tree. libgcov emitted .gcda files leverages this optimization while clang
--coverage's doesn't.

Propagate counts by Kirchhoff's circuit law so that llvm-cov gcov can
correctly print line counts of gcc --coverage emitted files and enable
the future improvement of clang --coverage.




More information about the All-commits mailing list