LLVM: llvm::StableFunctionMapRecord Struct Reference (original) (raw)
The structure of the serialized stable function map is as follows: More...
#include "[llvm/CGData/StableFunctionMapRecord.h](StableFunctionMapRecord%5F8h%5Fsource.html)"
| 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. |
The structure of the serialized stable function map is as follows:
- Number of unique function/module names
- Total size of unique function/module names for opt-in skipping
- Unique function/module names
- Padding to align to 4 bytes
- Number of StableFunctionEntries
- Hashes of each StableFunctionEntry
- Fixed-size fields for each StableFunctionEntry (the order is consistent with the hashes above):
- FunctionNameId
- ModuleNameId
- InstCount
- Relative offset to the beginning of IndexOperandHashes for this entry
- Total size of variable-sized IndexOperandHashes for lazy-loading support
- Variable-sized IndexOperandHashes for each StableFunctionEntry:
- Number of IndexOperandHashes
- Contents of each IndexOperandHashes
* InstIndex
* OpndIndex
* OpndHash
Definition at line 47 of file StableFunctionMapRecord.h.
| llvm::StableFunctionMapRecord::StableFunctionMapRecord ( ) | inline |
|---|
◆ StableFunctionMapRecord() [2/2]
| llvm::StableFunctionMapRecord::StableFunctionMapRecord ( std::unique_ptr< StableFunctionMap > FunctionMap) | inline |
|---|
◆ deserialize()
◆ deserializeEntry()
◆ deserializeYAML()
| void StableFunctionMapRecord::deserializeYAML | ( | yaml::Input & | YIS | ) |
|---|
◆ empty()
| bool llvm::StableFunctionMapRecord::empty ( ) const | inline |
|---|
◆ finalize()
| void llvm::StableFunctionMapRecord::finalize ( bool SkipTrim = false) | inline |
|---|
◆ lazyDeserialize()
| void StableFunctionMapRecord::lazyDeserialize | ( | std::shared_ptr< MemoryBuffer > | Buffer, |
|---|---|---|---|
| uint64_t | Offset ) |
◆ merge()
◆ print()
◆ serialize() [1/2]
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().
◆ serialize() [2/2]
◆ serializeYAML()
| void StableFunctionMapRecord::serializeYAML | ( | yaml::Output & | YOS | ) | const |
|---|
◆ setReadStableFunctionMapNames()
| void llvm::StableFunctionMapRecord::setReadStableFunctionMapNames ( bool Read) | inline |
|---|
◆ 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().
The documentation for this struct was generated from the following files:
- include/llvm/CGData/StableFunctionMapRecord.h
- lib/CGData/StableFunctionMapRecord.cpp