diff options
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/include/llvm/ProfileData/InstrProf.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/include/llvm/ProfileData/InstrProf.h b/llvm/include/llvm/ProfileData/InstrProf.h index 5ec7d65773c..20d1574b309 100644 --- a/llvm/include/llvm/ProfileData/InstrProf.h +++ b/llvm/include/llvm/ProfileData/InstrProf.h @@ -538,6 +538,18 @@ typedef struct ValueProfData { ValueProfRecord *getFirstValueProfRecord(); } ValueProfData; +typedef struct ValueProfRecordClosure { + void *Record; + uint32_t (*GetNumValueKinds)(void *Record); + uint32_t (*GetNumValueSites)(void *Record, uint32_t VKind); + uint32_t (*GetNumValueData)(void *Record, uint32_t VKind); + uint32_t (*GetNumValueDataForSite)(void *R, uint32_t VK, uint32_t S); + uint64_t (*RemapValueData)(uint64_t Value); + void (*GetValueForSite)(InstrProfValueData Dst[], void *R, uint32_t K, + uint32_t S); + ValueProfData *(*AllocateValueProfData)(size_t TotalSizeInBytes); +} ValueProfRecordClosure; + inline uint32_t getValueProfRecordHeaderSize(uint32_t NumValueSites) { uint32_t Size = offsetof(ValueProfRecord, SiteCountArray) + sizeof(uint8_t) * NumValueSites; |