21 OS <<
"# MemProfSummary:\n";
22 OS <<
"# Total contexts: " << NumContexts <<
"\n";
23 OS <<
"# Total cold contexts: " << NumColdContexts <<
"\n";
24 OS <<
"# Total hot contexts: " << NumHotContexts <<
"\n";
25 OS <<
"# Maximum cold context total size: " << MaxColdTotalSize <<
"\n";
26 OS <<
"# Maximum warm context total size: " << MaxWarmTotalSize <<
"\n";
27 OS <<
"# Maximum hot context total size: " << MaxHotTotalSize <<
"\n";
34 auto StartPos = OS.
tell();
36 OS.
write(NumContexts);
37 OS.
write(NumColdContexts);
38 OS.
write(NumHotContexts);
39 OS.
write(MaxColdTotalSize);
40 OS.
write(MaxWarmTotalSize);
41 OS.
write(MaxHotTotalSize);
46std::unique_ptr<MemProfSummary>
48 auto NumSummaryFields =
61 auto MemProfSum = std::make_unique<MemProfSummary>(
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
LLVM_ABI uint64_t tell() const
LLVM_ABI void write32(uint32_t V)
LLVM_ABI void write(uint64_t V)
LLVM_ABI void printSummaryYaml(raw_ostream &OS) 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.
static constexpr unsigned getNumSummaryFields()
This class implements an extremely fast bulk output stream that can only output to a stream.
value_type read(const void *memory, endianness endian)
Read a value of a particular endianness from memory.
value_type readNext(const CharT *&memory, endianness endian)
Read a value of a particular endianness from a buffer, and increment the buffer past that value.
This is an optimization pass for GlobalISel generic memory operations.