16#ifndef LLVM_OBJECTYAML_BBADDRMAPYAML_H
17#define LLVM_OBJECTYAML_BBADDRMAPYAML_H
36 std::optional<llvm::yaml::Hex64>
Hash;
48 std::optional<std::vector<BBRangeEntry>>
BBRanges;
53 return BBRanges->front().BaseAddress;
63 for (
const BBEntry &BBE : *BBR.BBEntries)
89 const std::vector<PGOAnalysisMapEntry> *PGOAnalyses,
99 std::optional<std::vector<BBAddrMapEntry>> &Entries,
100 std::optional<std::vector<PGOAnalysisMapEntry>> &PGOAnalyses);
117template <>
struct MappingTraits<BBAddrMapYAML::BBAddrMapEntry> {
118 LLVM_ABI static void mapping(IO &IO, BBAddrMapYAML::BBAddrMapEntry &
E);
121template <>
struct MappingTraits<BBAddrMapYAML::BBAddrMapEntry::BBRangeEntry> {
122 LLVM_ABI static void mapping(IO &IO,
123 BBAddrMapYAML::BBAddrMapEntry::BBRangeEntry &
E);
126template <>
struct MappingTraits<BBAddrMapYAML::BBAddrMapEntry::BBEntry> {
127 LLVM_ABI static void mapping(IO &IO,
128 BBAddrMapYAML::BBAddrMapEntry::BBEntry &
E);
131template <>
struct MappingTraits<BBAddrMapYAML::PGOAnalysisMapEntry> {
132 LLVM_ABI static void mapping(IO &IO, BBAddrMapYAML::PGOAnalysisMapEntry &
E);
136struct MappingTraits<BBAddrMapYAML::PGOAnalysisMapEntry::PGOBBEntry> {
138 mapping(IO &IO, BBAddrMapYAML::PGOAnalysisMapEntry::PGOBBEntry &
E);
143 BBAddrMapYAML::PGOAnalysisMapEntry::PGOBBEntry::SuccessorEntry> {
146 BBAddrMapYAML::PGOAnalysisMapEntry::PGOBBEntry::SuccessorEntry &
E);
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
#define LLVM_YAML_IS_SEQUENCE_VECTOR(type)
Utility for declaring that a std::vector of a particular type should be considered a YAML sequence.
Represent a constant reference to an array (0 or more elements consecutively in memory),...
Lightweight error class with error context and mandatory checking.
LLVM_ABI Error decodePayload(ArrayRef< uint8_t > Content, llvm::endianness Endian, unsigned AddressSize, std::optional< std::vector< BBAddrMapEntry > > &Entries, std::optional< std::vector< PGOAnalysisMapEntry > > &PGOAnalyses)
Decodes the BBAddrMap payload in Content into Entries and PGOAnalyses.
LLVM_ABI void encodePayload(ArrayRef< BBAddrMapEntry > Entries, const std::vector< PGOAnalysisMapEntry > *PGOAnalyses, yaml::ContiguousBlobAccumulator &CBA, llvm::endianness Endian, unsigned AddressSize)
Encodes the BBAddrMap payload into CBA.
This is an optimization pass for GlobalISel generic memory operations.
llvm::yaml::Hex64 Metadata
std::optional< std::vector< llvm::yaml::Hex64 > > CallsiteEndOffsets
std::optional< llvm::yaml::Hex64 > Hash
llvm::yaml::Hex64 AddressOffset
std::optional< std::vector< BBEntry > > BBEntries
std::optional< uint64_t > NumBlocks
llvm::yaml::Hex64 BaseAddress
std::optional< std::vector< BBRangeEntry > > BBRanges
llvm::yaml::Hex64 getFunctionAddress() const
std::optional< uint64_t > NumBBRanges
bool hasAnyCallsiteEndOffsets() const
llvm::yaml::Hex16 Feature
std::optional< uint32_t > PostLinkBrFreq
std::optional< std::vector< SuccessorEntry > > Successors
std::optional< uint64_t > BBFreq
std::optional< uint32_t > PostLinkBBFreq
std::optional< uint64_t > FuncEntryCount
std::optional< std::vector< PGOBBEntry > > PGOBBEntries
This class should be specialized by any type that needs to be converted to/from a YAML mapping.