15 #ifndef LLVM_PROFILEDATA_INSTRPROFWRITER_H
16 #define LLVM_PROFILEDATA_INSTRPROFWRITER_H
20 #include "llvm/Support/DataTypes.h"
28 class InstrProfRecordWriterTrait;
68 return (IsIRLevel == (ProfileKind ==
PF_IRLevel))
70 : make_error<InstrProfError>(
void setValueProfDataEndianness(support::endianness Endianness)
A symbol table used for function PGO name look-up with keys (such as pointers, md5hash values) to the...
Error addRecord(InstrProfRecord &&I, uint64_t Weight=1)
Add function counts for the given function.
InstrProfWriter(bool Sparse=false)
void writeText(raw_fd_ostream &OS)
Write the profile in text format to OS.
void setOutputSparse(bool Sparse)
Error mergeRecordsFromWriter(InstrProfWriter &&IPW)
Merge existing function counts from the given writer.
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.
A raw_ostream that writes to a file descriptor.
Profiling information for a single function.
SmallDenseMap< uint64_t, InstrProfRecord, 1 > ProfilingData
void write(raw_fd_ostream &OS)
Write the profile to OS.
Lightweight error class with error context and mandatory checking.
std::unique_ptr< MemoryBuffer > writeBuffer()
Write the profile, returning the raw data. For testing.
static void writeRecordInText(const InstrProfRecord &Record, InstrProfSymtab &Symtab, raw_fd_ostream &OS)
Write Record in text format to OS.