summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2014-04-18 21:52:00 +0000
committerJustin Bogner <mail@justinbogner.com>2014-04-18 21:52:00 +0000
commit837a6f6f79fc44bf6467ac874f4e3c411a62bedf (patch)
treef6cd2dd6cdd0f5c5b34748f418ccafd2ff911133 /clang/lib/CodeGen/CodeGenModule.h
parentfc83c1105c698c343a11e238ba6b93464fe8c5df (diff)
downloadbcm5719-llvm-837a6f6f79fc44bf6467ac874f4e3c411a62bedf.tar.gz
bcm5719-llvm-837a6f6f79fc44bf6467ac874f4e3c411a62bedf.zip
CodeGen: Use LLVM's InstrProfReader in -fprofile-instr-use=
Update clang to use the InstrProfReader from LLVM to read instrumentation based profile data. This also switches us from the naive text format to the binary format, since that's what's implemented in the reader. llvm-svn: 206658
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index f6614dd44bd..0fd325b083b 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/lib/CodeGen/CodeGenModule.h
@@ -42,6 +42,7 @@ namespace llvm {
class DataLayout;
class FunctionType;
class LLVMContext;
+ class IndexedInstrProfReader;
}
namespace clang {
@@ -85,7 +86,6 @@ namespace CodeGen {
class CGCUDARuntime;
class BlockFieldFlags;
class FunctionArgList;
- class PGOProfileData;
struct OrderGlobalInits {
unsigned int priority;
@@ -266,7 +266,7 @@ class CodeGenModule : public CodeGenTypeCache {
ARCEntrypoints *ARCData;
llvm::MDNode *NoObjCARCExceptionsMetadata;
RREntrypoints *RRData;
- PGOProfileData *PGOData;
+ std::unique_ptr<llvm::IndexedInstrProfReader> PGOReader;
InstrProfStats PGOStats;
// WeakRefReferences - A set of references that have only been seen via
@@ -493,13 +493,8 @@ public:
return *RRData;
}
- InstrProfStats &getPGOStats() {
- return PGOStats;
- }
-
- PGOProfileData *getPGOData() const {
- return PGOData;
- }
+ InstrProfStats &getPGOStats() { return PGOStats; }
+ llvm::IndexedInstrProfReader *getPGOReader() const { return PGOReader.get(); }
llvm::Constant *getStaticLocalDeclAddress(const VarDecl *D) {
return StaticLocalDeclMap[D];
OpenPOWER on IntegriCloud