14 #ifndef LLVM_SUPPORT_PROFILE_SUMMARY_H
15 #define LLVM_SUPPORT_PROFILE_SUMMARY_H
41 uint64_t TheNumCounts)
53 static const char *KindStr[2];
55 uint64_t TotalCount, MaxCount, MaxInternalCount, MaxFunctionCount;
61 static const int Scale = 1000000;
63 uint64_t TotalCount, uint64_t MaxCount,
64 uint64_t MaxInternalCount, uint64_t MaxFunctionCount,
66 : PSK(K), DetailedSummary(std::move(DetailedSummary)),
67 TotalCount(TotalCount), MaxCount(MaxCount),
68 MaxInternalCount(MaxInternalCount), MaxFunctionCount(MaxFunctionCount),
69 NumCounts(NumCounts), NumFunctions(NumFunctions) {}
uint32_t Cutoff
The required percentile of counts.
uint64_t getMaxInternalCount()
Metadata * getMD(LLVMContext &Context)
Return summary information as metadata.
ProfileSummary(Kind K, SummaryEntryVector DetailedSummary, uint64_t TotalCount, uint64_t MaxCount, uint64_t MaxInternalCount, uint64_t MaxFunctionCount, uint32_t NumCounts, uint32_t NumFunctions)
uint64_t getMaxFunctionCount()
SummaryEntryVector & getDetailedSummary()
This is an important class for using LLVM in a threaded context.
ProfileSummaryEntry(uint32_t TheCutoff, uint64_t TheMinCount, uint64_t TheNumCounts)
static ProfileSummary * getFromMD(Metadata *MD)
Construct profile summary from metdata.
uint32_t getNumFunctions()
uint64_t MinCount
The minimum count for this percentile.
uint64_t NumCounts
Number of counts >= the minimum count.
std::vector< ProfileSummaryEntry > SummaryEntryVector