20 return std::make_unique<MemProfSummary>(NumContexts, NumColdContexts,
21 NumHotContexts, MaxColdTotalSize,
22 MaxWarmTotalSize, MaxHotTotalSize);
25void MemProfSummaryBuilder::addRecord(
uint64_t CSId,
32 Info.getAllocCount(),
Info.getTotalLifetime());
33 auto TotalSize =
Info.getTotalSize();
37 if (TotalSize > MaxColdTotalSize)
38 MaxColdTotalSize = TotalSize;
41 if (TotalSize > MaxWarmTotalSize)
42 MaxWarmTotalSize = TotalSize;
46 if (TotalSize > MaxHotTotalSize)
47 MaxHotTotalSize = TotalSize;
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
Analysis containing CSE Info
std::pair< iterator, bool > insert(const ValueT &V)
LLVM_ABI std::unique_ptr< MemProfSummary > getSummary()
LLVM_ABI AllocationType getAllocType(uint64_t TotalLifetimeAccessDensity, uint64_t AllocCount, uint64_t TotalLifetime)
Return the allocation type for a given set of memory profile values.
LLVM_ABI uint64_t computeFullStackId(ArrayRef< Frame > CallStack)
Helper to generate a single hash id for a given callstack, used for emitting matching statistics and ...
This is an optimization pass for GlobalISel generic memory operations.