[PATCH] Fixed llvm-cov to count edges instead of blocks

Bob Wilson bob.wilson at apple.com
Wed Oct 23 17:37:36 PDT 2013


Looks good.  Please commit.

On Oct 23, 2013, at 1:01 PM, Yuchen Wu <yuchenericwu at hotmail.com> wrote:

> This was a fundamental flaw in llvm-cov where it treated the values in
> the GCDA files as block counts instead of edge counts. This created
> incorrect line counts when branching was present. Instead, the edge
> counts should be summed to obtain the correct block count.
> 
> The fix was tested using custom test files as well as single source
> files from the test-suite directory. The behaviour can be verified by
> reading the GCOV documentation that describes the GCDA spec ("ARC_COUNTS
> gives the counter values for those arcs that are instrumented") and the
> header description provided by GCOVProfiling.cpp ("instruments the code
> that runs to records (sic) the edges between blocks that run and emit a
> complementary "gcda" file on exit"). 		 	   		  <0007-Fixed-llvm-cov-to-count-edges-instead-of-blocks.patch>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list