summaryrefslogtreecommitdiff
path: root/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
commit2a840244b1b655e5863a05bd2e860c31853eacd2 (patch)
tree63375e185c75213da2716062ea45cd192d6c4239 /lib/CodeGen/CodeGenModule.h
parentc214a6c21ea6fb4367e54391fafc44911680d9e5 (diff)
downloadclang-2a840244b1b655e5863a05bd2e860c31853eacd2.tar.gz
clang-2a840244b1b655e5863a05bd2e860c31853eacd2.tar.bz2
clang-2a840244b1b655e5863a05bd2e860c31853eacd2.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206658 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
-rw-r--r--lib/CodeGen/CodeGenModule.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h
index f6614dd44b..0fd325b083 100644
--- a/lib/CodeGen/CodeGenModule.h
+++ b/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];