13#ifndef LLVM_PROFILEDATA_MEMPROFSUMMARY_H
14#define LLVM_PROFILEDATA_MEMPROFSUMMARY_H
31 static constexpr unsigned NumSummaryFields = 6;
33 const uint64_t NumContexts, NumColdContexts, NumHotContexts;
34 const uint64_t MaxColdTotalSize, MaxWarmTotalSize, MaxHotTotalSize;
38 bool HasDataAccessProfile =
false;
39 size_t NumHotSymbolsAndStringLiterals = 0;
40 size_t NumKnownColdSymbols = 0;
41 size_t NumKnownColdStringLiterals = 0;
47 : NumContexts(NumContexts), NumColdContexts(NumColdContexts),
48 NumHotContexts(NumHotContexts), MaxColdTotalSize(MaxColdTotalSize),
49 MaxWarmTotalSize(MaxWarmTotalSize), MaxHotTotalSize(MaxHotTotalSize),
50 HasDataAccessProfile(
false) {}
63 LLVM_ABI static std::unique_ptr<MemProfSummary>
Encapsulates the data access profile data and the methods to operate on it.
uint64_t getMaxColdTotalSize() const
LLVM_ABI void printSummaryYaml(raw_ostream &OS) const
MemProfSummary(uint64_t NumContexts, uint64_t NumColdContexts, uint64_t NumHotContexts, uint64_t MaxColdTotalSize, uint64_t MaxWarmTotalSize, uint64_t MaxHotTotalSize)
uint64_t getNumHotContexts() const
LLVM_ABI void buildDataAccessSummary(const DataAccessProfData &DataAccessProfile)
Build data access profile summary from DataAccessProfile.
uint64_t getMaxHotTotalSize() const
uint64_t getNumColdContexts() const
uint64_t getMaxWarmTotalSize() const
LLVM_ABI void write(ProfOStream &OS) const
Write to indexed MemProf profile.
static LLVM_ABI std::unique_ptr< MemProfSummary > deserialize(const unsigned char *&)
Read from indexed MemProf profile.
uint64_t getNumContexts() const
static constexpr unsigned getNumSummaryFields()
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.