diff options
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
| -rw-r--r-- | lib/CodeGen/CodeGenModule.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index 0d13bdcc2f..f6614dd44b 100644 --- a/lib/CodeGen/CodeGenModule.h +++ b/lib/CodeGen/CodeGenModule.h @@ -220,6 +220,15 @@ struct ARCEntrypoints { llvm::Constant *clang_arc_use; }; +/// This class records statistics on instrumentation based profiling. +struct InstrProfStats { + InstrProfStats() : Visited(0), Missing(0), Mismatched(0) {} + bool isOutOfDate() { return Missing || Mismatched; } + uint32_t Visited; + uint32_t Missing; + uint32_t Mismatched; +}; + /// CodeGenModule - This class organizes the cross-function state that is used /// while generating LLVM code. class CodeGenModule : public CodeGenTypeCache { @@ -258,6 +267,7 @@ class CodeGenModule : public CodeGenTypeCache { llvm::MDNode *NoObjCARCExceptionsMetadata; RREntrypoints *RRData; PGOProfileData *PGOData; + InstrProfStats PGOStats; // WeakRefReferences - A set of references that have only been seen via // a weakref so far. This is used to remove the weak of the reference if we @@ -483,6 +493,10 @@ public: return *RRData; } + InstrProfStats &getPGOStats() { + return PGOStats; + } + PGOProfileData *getPGOData() const { return PGOData; } |
