[cfe-dev] SBCC and emitEmptyMapping

Harp, Thom via cfe-dev cfe-dev at lists.llvm.org
Thu May 10 13:25:38 PDT 2018


Compared to LLVM’s gcov-compatible coverage method, SBCC’s resource requirements are much bigger.  The total size of all .profraw files from my system is almost 1GB while the same system, built for gcov, totals only 150MB of .gcda files.  I removed emitEmptyMapping from CoverageMapping.cpp to see what happens, and the SBCC coverage dumps dropped from 1GB to about 26MB.  There are also significant gains in runtime memory use and on-disk image size.

I don’t mind losing the zero counts for code that is unused but I want to understand how clang determines what’s used and what isn’t.  I traced the decision up to CodeGenPGO::assignRegionCounters in CodeGenPGO.cpp, where implicit functions and some constructor/destructor variants are eliminated but I can’t explain the bulk of it.

Can someone help me understand how clang determines what code is used and what isn’t in this context?

Thanks.
-thom

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180510/bf85d6c4/attachment.html>


More information about the cfe-dev mailing list