13#ifndef LLVM_PROFILEDATA_PGOCTXPROFWRITER_H_
14#define LLVM_PROFILEDATA_PGOCTXPROFWRITER_H_
79 enum class EmptyContextCriteria { None, EntryIsZero, AllAreZero };
82 const bool IncludeEmpty;
85 void writeCallsiteIndex(
uint32_t Index);
86 void writeRootEntryCount(
uint64_t EntryCount);
93 std::optional<unsigned> VersionOverride = std::nullopt,
94 bool IncludeEmpty =
false);
97 void startContextSection()
override;
101 void endContextSection()
override;
103 void startFlatSection()
override;
105 size_t BufferSize)
override;
106 void endFlatSection()
override;
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Lightweight error class with error context and mandatory checking.
static constexpr unsigned VBREncodingBits
static constexpr uint32_t CurrentVersion
PGOCtxProfileWriter(raw_ostream &Out, std::optional< unsigned > VersionOverride=std::nullopt, bool IncludeEmpty=false)
static constexpr StringRef ContainerMagic
static constexpr unsigned CodeLen
StringRef - Represent a constant reference to a string, i.e.
Abstraction for the parameter passed to __llvm_ctx_profile_fetch.
This class implements an extremely fast bulk output stream that can only output to a stream.
@ FIRST_APPLICATION_BLOCKID
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI Error createCtxProfFromYAML(StringRef Profile, raw_ostream &Out)
FunctionAddr VTableAddr uintptr_t uintptr_t Version
@ FlatProfilesSectionBlockID