summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenPGO.h
diff options
context:
space:
mode:
authorSerge Pavlov <sepavloff@gmail.com>2015-12-06 14:32:39 +0000
committerSerge Pavlov <sepavloff@gmail.com>2015-12-06 14:32:39 +0000
commit3a5614599a10ad4a58431d739ce49e87ce4e0ee7 (patch)
tree32fe488dd0a143130e22d0a852ccc34ee161fb93 /clang/lib/CodeGen/CodeGenPGO.h
parent41ecf460fa71fb76f215ea103d39c3c2e34f75d1 (diff)
downloadbcm5719-llvm-3a5614599a10ad4a58431d739ce49e87ce4e0ee7.tar.gz
bcm5719-llvm-3a5614599a10ad4a58431d739ce49e87ce4e0ee7.zip
[PGO] Instrument only base constructors and destructors.
Constructors and destructors may be represented by several functions in IR. Only base structors correspond to source code, others are small pieces of code and eventually call the base variant. In this case instrumentation of non-base structors has little sense, this fix remove it. Now profile data of a declaration corresponds to exactly one function in IR, it agrees with the current logic of the profile data loading. This change fixes PR24996. Differential Revision: http://reviews.llvm.org/D15158 llvm-svn: 254876
Diffstat (limited to 'clang/lib/CodeGen/CodeGenPGO.h')
-rw-r--r--clang/lib/CodeGen/CodeGenPGO.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenPGO.h b/clang/lib/CodeGen/CodeGenPGO.h
index 350cdcce3e8..6bf29ecaa7c 100644
--- a/clang/lib/CodeGen/CodeGenPGO.h
+++ b/clang/lib/CodeGen/CodeGenPGO.h
@@ -78,13 +78,11 @@ public:
setCurrentRegionCount(*Count);
}
- /// Check if we need to emit coverage mapping for a given declaration
- void checkGlobalDecl(GlobalDecl GD);
/// Assign counters to regions and configure them for PGO of a given
/// function. Does nothing if instrumentation is not enabled and either
/// generates global variables or associates PGO data with each of the
/// counters depending on whether we are generating or using instrumentation.
- void assignRegionCounters(const Decl *D, llvm::Function *Fn);
+ void assignRegionCounters(GlobalDecl GD, llvm::Function *Fn);
/// Emit a coverage mapping range with a counter zero
/// for an unused declaration.
void emitEmptyCounterMapping(const Decl *D, StringRef FuncName,
OpenPOWER on IntegriCloud