LLVM 22.0.0git
|
The structure of the serialized stable function map is as follows: More...
#include "llvm/CGData/StableFunctionMapRecord.h"
Public Member Functions | |
StableFunctionMapRecord () | |
StableFunctionMapRecord (std::unique_ptr< StableFunctionMap > FunctionMap) | |
LLVM_ABI void | serialize (raw_ostream &OS, std::vector< CGDataPatchItem > &PatchItems) const |
Serialize the stable function map to a raw_ostream. | |
LLVM_ABI void | deserialize (const unsigned char *&Ptr) |
Deserialize the stable function map from a raw_ostream. | |
LLVM_ABI void | lazyDeserialize (std::shared_ptr< MemoryBuffer > Buffer, uint64_t Offset) |
Lazily deserialize the stable function map from Buffer starting at Offset. | |
LLVM_ABI void | serializeYAML (yaml::Output &YOS) const |
Serialize the stable function map to a YAML stream. | |
LLVM_ABI void | deserializeYAML (yaml::Input &YIS) |
Deserialize the stable function map from a YAML stream. | |
void | finalize (bool SkipTrim=false) |
Finalize the stable function map by trimming content. | |
void | merge (const StableFunctionMapRecord &Other) |
Merge the stable function map into this one. | |
bool | empty () const |
void | print (raw_ostream &OS=llvm::errs()) const |
Print the stable function map in a YAML format. | |
void | setReadStableFunctionMapNames (bool Read) |
Set whether to read stable function names from the buffer. |
Static Public Member Functions | |
static LLVM_ABI void | serialize (raw_ostream &OS, const StableFunctionMap *FunctionMap, std::vector< CGDataPatchItem > &PatchItems) |
A static helper function to serialize the stable function map without owning the stable function map. | |
static LLVM_ABI void | deserializeEntry (const unsigned char *Ptr, stable_hash Hash, StableFunctionMap *FunctionMap) |
A static helper function to deserialize the stable function map entry. |
Public Attributes | |
std::unique_ptr< StableFunctionMap > | FunctionMap |
The structure of the serialized stable function map is as follows:
Definition at line 47 of file StableFunctionMapRecord.h.
|
inline |
Definition at line 50 of file StableFunctionMapRecord.h.
References FunctionMap.
Referenced by merge().
|
inline |
Definition at line 54 of file StableFunctionMapRecord.h.
References FunctionMap, and llvm::move().
Deserialize the stable function map from a raw_ostream.
Definition at line 258 of file StableFunctionMapRecord.cpp.
References deserialize(), and Ptr.
Referenced by deserialize(), lazyDeserialize(), and llvm::CodeGenDataReader::mergeFromObjectFile().
|
static |
A static helper function to deserialize the stable function map entry.
Ptr should be pointing to the start of the fixed-sized fields of the entry when passed in.
Definition at line 145 of file StableFunctionMapRecord.cpp.
References assert(), FunctionMap, Ptr, and llvm::support::endian::readNext().
void StableFunctionMapRecord::deserializeYAML | ( | yaml::Input & | YIS | ) |
Deserialize the stable function map from a YAML stream.
Definition at line 284 of file StableFunctionMapRecord.cpp.
References FunctionMap, and llvm::yaml::Input::nextDocument().
|
inline |
Definition at line 98 of file StableFunctionMapRecord.h.
References FunctionMap.
Referenced by llvm::cgdata::mergeCodeGenData().
|
inline |
Finalize the stable function map by trimming content.
Definition at line 90 of file StableFunctionMapRecord.h.
References FunctionMap.
Referenced by llvm::cgdata::mergeCodeGenData().
void StableFunctionMapRecord::lazyDeserialize | ( | std::shared_ptr< MemoryBuffer > | Buffer, |
uint64_t | Offset ) |
Lazily deserialize the stable function map from Buffer starting at Offset.
The individual stable function entry would be read lazily from Buffer when the function map is accessed.
Definition at line 262 of file StableFunctionMapRecord.cpp.
References deserialize(), FunctionMap, llvm::Offset, and Ptr.
|
inline |
Merge the stable function map into this one.
Definition at line 93 of file StableFunctionMapRecord.h.
References FunctionMap, llvm::Other, and StableFunctionMapRecord().
Referenced by llvm::CodeGenDataReader::mergeFromObjectFile().
|
inline |
Print the stable function map in a YAML format.
Definition at line 101 of file StableFunctionMapRecord.h.
References llvm::errs(), and serializeYAML().
|
static |
A static helper function to serialize the stable function map without owning the stable function map.
Definition at line 85 of file StableFunctionMapRecord.cpp.
References FunctionMap, getStableFunctionEntries(), getStableIndexOperandHashes(), I, llvm::little, llvm::Offset, llvm::offsetToAlignment(), llvm::support::endian::Writer::OS, llvm::ArrayRef< T >::size(), llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::raw_ostream::tell(), and llvm::support::endian::Writer::write().
Referenced by llvm::GlobalMergeFunc::emitFunctionMap(), and serialize().
void StableFunctionMapRecord::serialize | ( | raw_ostream & | OS, |
std::vector< CGDataPatchItem > & | PatchItems ) const |
Serialize the stable function map to a raw_ostream.
Definition at line 80 of file StableFunctionMapRecord.cpp.
References FunctionMap, and serialize().
void StableFunctionMapRecord::serializeYAML | ( | yaml::Output & | YOS | ) | const |
Serialize the stable function map to a YAML stream.
Definition at line 270 of file StableFunctionMapRecord.cpp.
References FunctionMap, getStableFunctionEntries(), and getStableIndexOperandHashes().
Referenced by print().
|
inline |
Set whether to read stable function names from the buffer.
Has no effect if the function map is read from a YAML stream.
Definition at line 108 of file StableFunctionMapRecord.h.
References assert(), FunctionMap, and llvm::Read.
std::unique_ptr<StableFunctionMap> llvm::StableFunctionMapRecord::FunctionMap |
Definition at line 48 of file StableFunctionMapRecord.h.
Referenced by deserializeEntry(), deserializeYAML(), empty(), finalize(), lazyDeserialize(), merge(), llvm::cgdata::mergeCodeGenData(), serialize(), serialize(), serializeYAML(), setReadStableFunctionMapNames(), StableFunctionMapRecord(), and StableFunctionMapRecord().