[PGO] Simplify coverage mapping lowering
authorXinliang David Li <davidxl@google.com>
Thu, 7 Jan 2016 20:05:49 +0000 (20:05 +0000)
committerXinliang David Li <davidxl@google.com>
Thu, 7 Jan 2016 20:05:49 +0000 (20:05 +0000)
commite2de1d23e087c436c3d403bd010966aef37c56cd
tree8821b7adcc82e3d54ae16267f3063957aa2c7536
parent9af3bcd89abc4d62a259a5c0953fb4d5795db09b
[PGO] Simplify coverage mapping lowering

Coverage mapping data may reference names of functions
that are skipped by FE (e.g, unused inline functions). Since
those functions are skipped, normal instr-prof function lowering
pass won't put those names in the right section, so special
handling is needed to walk through coverage mapping structure
and recollect the references.

With this patch, only names that are skipped are processed. This
simplifies the lowering code and it no longer needs to make
assumptions coverage mapping data layout. It should also be
more efficient.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257091 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ProfileData/InstrProf.h
lib/Transforms/Instrumentation/InstrProfiling.cpp