13#ifndef LLVM_PROFILEDATA_PGOCTXPROFWRITER_H_
14#define LLVM_PROFILEDATA_PGOCTXPROFWRITER_H_
79 enum class EmptyContextCriteria {
None, EntryIsZero, AllAreZero };
82 const bool IncludeEmpty;
86 void writeRootEntryCount(
uint64_t EntryCount);
93 std::optional<unsigned> VersionOverride = std::nullopt,
94 bool IncludeEmpty =
false);
97 void startContextSection()
override;
100 uint64_t TotalRootEntryCount)
override;
101 void endContextSection()
override;
103 void startFlatSection()
override;
105 size_t BufferSize)
override;
106 void endFlatSection()
override;
109 static constexpr unsigned CodeLen = 2;
111 static constexpr unsigned VBREncodingBits = 6;
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Lightweight error class with error context and mandatory checking.
Write one or more ContextNodes to the provided raw_fd_stream.
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)
@ FlatProfilesSectionBlockID