LLVM 20.0.0git
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
llvm::StableFunctionMapRecord Struct Reference

#include "llvm/CGData/StableFunctionMapRecord.h"

Public Member Functions

 StableFunctionMapRecord ()
 
 StableFunctionMapRecord (std::unique_ptr< StableFunctionMap > FunctionMap)
 
void serialize (raw_ostream &OS) const
 Serialize the stable function map to a raw_ostream.
 
void deserialize (const unsigned char *&Ptr)
 Deserialize the stable function map from a raw_ostream.
 
void serializeYAML (yaml::Output &YOS) const
 Serialize the stable function map to a YAML stream.
 
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.
 

Static Public Member Functions

static void serialize (raw_ostream &OS, const StableFunctionMap *FunctionMap)
 A static helper function to serialize the stable function map without owning the stable function map.
 

Public Attributes

std::unique_ptr< StableFunctionMapFunctionMap
 

Detailed Description

Definition at line 25 of file StableFunctionMapRecord.h.

Constructor & Destructor Documentation

◆ StableFunctionMapRecord() [1/2]

llvm::StableFunctionMapRecord::StableFunctionMapRecord ( )
inline

Definition at line 28 of file StableFunctionMapRecord.h.

References FunctionMap.

◆ StableFunctionMapRecord() [2/2]

llvm::StableFunctionMapRecord::StableFunctionMapRecord ( std::unique_ptr< StableFunctionMap FunctionMap)
inline

Definition at line 32 of file StableFunctionMapRecord.h.

Member Function Documentation

◆ deserialize()

void StableFunctionMapRecord::deserialize ( const unsigned char *&  Ptr)

Deserialize the stable function map from a raw_ostream.

Definition at line 123 of file StableFunctionMapRecord.cpp.

References llvm::alignAddr(), assert(), FunctionMap, I, Name, and Ptr.

Referenced by llvm::CodeGenDataReader::mergeFromObjectFile(), and llvm::IndexedCodeGenDataReader::read().

◆ deserializeYAML()

void StableFunctionMapRecord::deserializeYAML ( yaml::Input &  YIS)

Deserialize the stable function map from a YAML stream.

Definition at line 196 of file StableFunctionMapRecord.cpp.

References FunctionMap.

Referenced by llvm::TextCodeGenDataReader::read().

◆ empty()

bool llvm::StableFunctionMapRecord::empty ( ) const
inline
Returns
true if the stable function map is empty.

Definition at line 60 of file StableFunctionMapRecord.h.

References FunctionMap.

Referenced by llvm::cgdata::mergeCodeGenData().

◆ finalize()

void llvm::StableFunctionMapRecord::finalize ( bool  SkipTrim = false)
inline

Finalize the stable function map by trimming content.

Definition at line 52 of file StableFunctionMapRecord.h.

References FunctionMap.

Referenced by llvm::cgdata::mergeCodeGenData().

◆ merge()

void llvm::StableFunctionMapRecord::merge ( const StableFunctionMapRecord Other)
inline

Merge the stable function map into this one.

Definition at line 55 of file StableFunctionMapRecord.h.

References FunctionMap, and llvm::Other.

Referenced by llvm::CodeGenDataReader::mergeFromObjectFile().

◆ print()

void llvm::StableFunctionMapRecord::print ( raw_ostream OS = llvm::errs()) const
inline

Print the stable function map in a YAML format.

Definition at line 63 of file StableFunctionMapRecord.h.

References OS, and serializeYAML().

◆ serialize() [1/2]

void StableFunctionMapRecord::serialize ( raw_ostream OS) const

Serialize the stable function map to a raw_ostream.

Definition at line 80 of file StableFunctionMapRecord.cpp.

References FunctionMap, OS, and serialize().

◆ serialize() [2/2]

void StableFunctionMapRecord::serialize ( raw_ostream OS,
const StableFunctionMap FunctionMap 
)
static

A static helper function to serialize the stable function map without owning the stable function map.

Definition at line 84 of file StableFunctionMapRecord.cpp.

References FunctionMap, getStableFunctionEntries(), getStableIndexOperandHashes(), I, llvm::little, Name, llvm::offsetToAlignment(), llvm::support::endian::Writer::OS, OS, and llvm::support::endian::Writer::write().

Referenced by llvm::GlobalMergeFunc::emitFunctionMap(), and serialize().

◆ serializeYAML()

void StableFunctionMapRecord::serializeYAML ( yaml::Output &  YOS) const

Serialize the stable function map to a YAML stream.

Definition at line 182 of file StableFunctionMapRecord.cpp.

References llvm::SmallVectorImpl< T >::emplace_back(), FunctionMap, getStableFunctionEntries(), and getStableIndexOperandHashes().

Referenced by print(), and llvm::CodeGenDataWriter::writeText().

Member Data Documentation

◆ FunctionMap

std::unique_ptr<StableFunctionMap> llvm::StableFunctionMapRecord::FunctionMap

The documentation for this struct was generated from the following files: