summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenPGO.cpp
diff options
context:
space:
mode:
authorXinliang David Li <davidxl@google.com>2016-01-07 20:05:55 +0000
committerXinliang David Li <davidxl@google.com>2016-01-07 20:05:55 +0000
commit2129ae53ee56277198c36f2a2f66cb53f6a3bdfa (patch)
tree1f37d8079a9d0e95e3674049f1d9b750a1aa3759 /clang/lib/CodeGen/CodeGenPGO.cpp
parent810560773e3de59c03c2e0aea3426ffaf80ca23c (diff)
downloadbcm5719-llvm-2129ae53ee56277198c36f2a2f66cb53f6a3bdfa.tar.gz
bcm5719-llvm-2129ae53ee56277198c36f2a2f66cb53f6a3bdfa.zip
[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. llvm-svn: 257092
Diffstat (limited to 'clang/lib/CodeGen/CodeGenPGO.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenPGO.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenPGO.cpp b/clang/lib/CodeGen/CodeGenPGO.cpp
index 5ae861eab0d..2c0d93b394a 100644
--- a/clang/lib/CodeGen/CodeGenPGO.cpp
+++ b/clang/lib/CodeGen/CodeGenPGO.cpp
@@ -699,7 +699,7 @@ CodeGenPGO::emitEmptyCounterMapping(const Decl *D, StringRef Name,
setFuncName(Name, Linkage);
CGM.getCoverageMapping()->addFunctionMappingRecord(
- FuncNameVar, FuncName, FunctionHash, CoverageMapping);
+ FuncNameVar, FuncName, FunctionHash, CoverageMapping, false);
}
void CodeGenPGO::computeRegionCounts(const Decl *D) {
OpenPOWER on IntegriCloud