15 #ifndef LLVM_PROFILEDATA_INSTRPROFWRITER_H 16 #define LLVM_PROFILEDATA_INSTRPROFWRITER_H 30 class InstrProfRecordWriterTrait;
83 return (IsIRLevel == (ProfileKind == PF_IRLevel))
85 : make_error<InstrProfError>(
102 #endif // LLVM_PROFILEDATA_INSTRPROFWRITER_H
void setValueProfDataEndianness(support::endianness Endianness)
A symbol table used for function PGO name look-up with keys (such as pointers, md5hash values) to the...
This class represents lattice values for constants.
InstrProfWriter(bool Sparse=false)
An efficient, type-erasing, non-owning reference to a callable.
constexpr support::endianness Endianness
The endianness of all multi-byte encoded values in MessagePack.
void addRecord(NamedInstrProfRecord &&I, uint64_t Weight, function_ref< void(Error)> Warn)
Add function counts for the given function.
amdgpu Simplify well known AMD library false Value Value const Twine & Name
void mergeRecordsFromWriter(InstrProfWriter &&IPW, function_ref< void(Error)> Warn)
Merge existing function counts from the given writer.
void setOutputSparse(bool Sparse)
static ErrorSuccess success()
Create a success value.
StringMap - This is an unconventional map that is specialized for handling keys that are "strings"...
Error setIsIRLevelProfile(bool IsIRLevel)
Set the ProfileKind. Report error if mixing FE and IR level profiles.
static void writeRecordInText(StringRef Name, uint64_t Hash, const InstrProfRecord &Counters, InstrProfSymtab &Symtab, raw_fd_ostream &OS)
Write Record in text format to OS.
A raw_ostream that writes to a file descriptor.
Profiling information for a single function.
void addRecord(NamedInstrProfRecord &&I, function_ref< void(Error)> Warn)
void write(raw_fd_ostream &OS)
Write the profile to OS.
Error writeText(raw_fd_ostream &OS)
Write the profile in text format to OS.
Lightweight error class with error context and mandatory checking.
StringRef - Represent a constant reference to a string, i.e.
std::unique_ptr< MemoryBuffer > writeBuffer()
Write the profile, returning the raw data. For testing.