struct BitstreamRemarkSerializerHelper
Declaration
struct BitstreamRemarkSerializerHelper { /* full declaration omitted */ };
Description
Serialize the remarks to LLVM bitstream. This class provides ways to emit remarks in the LLVM bitstream format and its associated metadata. * The separate model: Separate meta: | Container info | String table | External file Separate remarks: | Container info | Remark version | Remark0 | Remark1 | Remark2 | ... * The standalone model: | Container info | String table | Remark version | Remark0 | Remark1 | Remark2 | ...
Declared at: llvm/include/llvm/Remarks/BitstreamRemarkSerializer.h:49
Member Variables
- public SmallVector<char, 1024> Encoded
- Buffer used for encoding the bitstream before writing it to the final stream.
- public SmallVector<uint64_t, 64> R
- Buffer used to construct records and pass to the bitstream writer.
- public llvm::BitstreamWriter Bitstream
- The Bitstream writer.
- public llvm::remarks::BitstreamRemarkContainerType ContainerType
- The type of the container we are serializing.
- public uint64_t RecordMetaContainerInfoAbbrevID = 0
- Abbrev IDs initialized in the block info block. Note: depending on the container type, some IDs might be uninitialized. Warning: When adding more abbrev IDs, make sure to update the BlockCodeSize (in the call to EnterSubblock).
- public uint64_t RecordMetaRemarkVersionAbbrevID = 0
- public uint64_t RecordMetaStrTabAbbrevID = 0
- public uint64_t RecordMetaExternalFileAbbrevID = 0
- public uint64_t RecordRemarkHeaderAbbrevID = 0
- public uint64_t RecordRemarkDebugLocAbbrevID = 0
- public uint64_t RecordRemarkHotnessAbbrevID = 0
- public uint64_t RecordRemarkArgWithDebugLocAbbrevID = 0
- public uint64_t RecordRemarkArgWithoutDebugLocAbbrevID = 0
Method Overview
- public BitstreamRemarkSerializerHelper(llvm::remarks::BitstreamRemarkContainerType ContainerType)
- public BitstreamRemarkSerializerHelper(const llvm::remarks::BitstreamRemarkSerializerHelper &)
- public BitstreamRemarkSerializerHelper(llvm::remarks::BitstreamRemarkSerializerHelper &&)
- public void emitMetaBlock(uint64_t ContainerVersion, Optional<uint64_t> RemarkVersion, Optional<const llvm::remarks::StringTable *> StrTab = None, Optional<llvm::StringRef> Filename = None)
- public void emitMetaExternalFile(llvm::StringRef Filename)
- public void emitMetaRemarkVersion(uint64_t RemarkVersion)
- public void emitMetaStrTab(const llvm::remarks::StringTable & StrTab)
- public void emitRemarkBlock(const llvm::remarks::Remark & Remark, llvm::remarks::StringTable & StrTab)
- public void flushToStream(llvm::raw_ostream & OS)
- public llvm::StringRef getBuffer()
- public void setupBlockInfo()
- public void setupMetaBlockInfo()
- public void setupMetaExternalFile()
- public void setupMetaRemarkVersion()
- public void setupMetaStrTab()
- public void setupRemarkBlockInfo()
Methods
¶BitstreamRemarkSerializerHelper(
llvm::remarks::BitstreamRemarkContainerType
ContainerType)
BitstreamRemarkSerializerHelper(
llvm::remarks::BitstreamRemarkContainerType
ContainerType)
Declared at: llvm/include/llvm/Remarks/BitstreamRemarkSerializer.h:74
Parameters
- llvm::remarks::BitstreamRemarkContainerType ContainerType
¶BitstreamRemarkSerializerHelper(
const llvm::remarks::
BitstreamRemarkSerializerHelper&)
BitstreamRemarkSerializerHelper(
const llvm::remarks::
BitstreamRemarkSerializerHelper&)
Declared at: llvm/include/llvm/Remarks/BitstreamRemarkSerializer.h:79
Parameters
- const llvm::remarks:: BitstreamRemarkSerializerHelper&
¶BitstreamRemarkSerializerHelper(
llvm::remarks::
BitstreamRemarkSerializerHelper&&)
BitstreamRemarkSerializerHelper(
llvm::remarks::
BitstreamRemarkSerializerHelper&&)
Declared at: llvm/include/llvm/Remarks/BitstreamRemarkSerializer.h:83
Parameters
¶void emitMetaBlock(
uint64_t ContainerVersion,
Optional<uint64_t> RemarkVersion,
Optional<const llvm::remarks::StringTable*>
StrTab = None,
Optional<llvm::StringRef> Filename = None)
void emitMetaBlock(
uint64_t ContainerVersion,
Optional<uint64_t> RemarkVersion,
Optional<const llvm::remarks::StringTable*>
StrTab = None,
Optional<llvm::StringRef> Filename = None)
Description
Emit the metadata for the remarks.
Declared at: llvm/include/llvm/Remarks/BitstreamRemarkSerializer.h:106
Parameters
- uint64_t ContainerVersion
- Optional<uint64_t> RemarkVersion
- Optional<const llvm::remarks::StringTable*> StrTab = None
- Optional<llvm::StringRef> Filename = None
¶void emitMetaExternalFile(
llvm::StringRef Filename)
void emitMetaExternalFile(
llvm::StringRef Filename)
Declared at: llvm/include/llvm/Remarks/BitstreamRemarkSerializer.h:100
Parameters
- llvm::StringRef Filename
¶void emitMetaRemarkVersion(uint64_t RemarkVersion)
void emitMetaRemarkVersion(uint64_t RemarkVersion)
Declared at: llvm/include/llvm/Remarks/BitstreamRemarkSerializer.h:94
Parameters
- uint64_t RemarkVersion
¶void emitMetaStrTab(
const llvm::remarks::StringTable& StrTab)
void emitMetaStrTab(
const llvm::remarks::StringTable& StrTab)
Declared at: llvm/include/llvm/Remarks/BitstreamRemarkSerializer.h:97
Parameters
- const llvm::remarks::StringTable& StrTab
¶void emitRemarkBlock(
const llvm::remarks::Remark& Remark,
llvm::remarks::StringTable& StrTab)
void emitRemarkBlock(
const llvm::remarks::Remark& Remark,
llvm::remarks::StringTable& StrTab)
Description
Emit a remark block. The string table is required.
Declared at: llvm/include/llvm/Remarks/BitstreamRemarkSerializer.h:112
Parameters
- const llvm::remarks::Remark& Remark
- llvm::remarks::StringTable& StrTab
¶void flushToStream(llvm::raw_ostream& OS)
void flushToStream(llvm::raw_ostream& OS)
Description
Finalize the writing to \p OS.
Declared at: llvm/include/llvm/Remarks/BitstreamRemarkSerializer.h:114
Parameters
¶llvm::StringRef getBuffer()
llvm::StringRef getBuffer()
Description
Finalize the writing to a buffer. The contents of the buffer remain valid for the lifetime of the object. Any call to any other function in this class will invalidate the buffer.
Declared at: llvm/include/llvm/Remarks/BitstreamRemarkSerializer.h:118
¶void setupBlockInfo()
void setupBlockInfo()
Description
Set up the necessary block info entries according to the container type.
Declared at: llvm/include/llvm/Remarks/BitstreamRemarkSerializer.h:88
¶void setupMetaBlockInfo()
void setupMetaBlockInfo()
Description
Set up the block info for the metadata block.
Declared at: llvm/include/llvm/Remarks/BitstreamRemarkSerializer.h:91
¶void setupMetaExternalFile()
void setupMetaExternalFile()
Description
The external file in the metadata block.
Declared at: llvm/include/llvm/Remarks/BitstreamRemarkSerializer.h:99
¶void setupMetaRemarkVersion()
void setupMetaRemarkVersion()
Description
The remark version in the metadata block.
Declared at: llvm/include/llvm/Remarks/BitstreamRemarkSerializer.h:93
¶void setupMetaStrTab()
void setupMetaStrTab()
Description
The strtab in the metadata block.
Declared at: llvm/include/llvm/Remarks/BitstreamRemarkSerializer.h:96
¶void setupRemarkBlockInfo()
void setupRemarkBlockInfo()
Description
The block info for the remarks block.
Declared at: llvm/include/llvm/Remarks/BitstreamRemarkSerializer.h:103