LLVM
10.0.0svn
|
Classes | |
struct | Argument |
A key-value pair with a debug location that is used to display the remarks at the right place in the source. More... | |
struct | BitstreamMetaParserHelper |
Helper to parse a META_BLOCK for a bitstream remark container. More... | |
struct | BitstreamMetaSerializer |
Serializer of metadata for bitstream remarks. More... | |
struct | BitstreamParserHelper |
Helper to parse any bitstream remark container. More... | |
struct | BitstreamRemarkParser |
Parses and holds the state of the latest parsed remark. More... | |
struct | BitstreamRemarkParserHelper |
Helper to parse a REMARK_BLOCK for a bitstream remark container. More... | |
struct | BitstreamRemarkSerializer |
Implementation of the remark serializer using LLVM bitstream. More... | |
struct | BitstreamRemarkSerializerHelper |
Serialize the remarks to LLVM bitstream. More... | |
class | EndOfFileError |
struct | MetaSerializer |
This is the base class for a remark metadata serializer. More... | |
struct | ParsedStringTable |
In-memory representation of the string table parsed from a buffer (e.g. More... | |
struct | Remark |
A remark type used for both emission and parsing. More... | |
struct | RemarkLocation |
The debug location used to track a remark back to the source file. More... | |
struct | RemarkParser |
Parser used to parse a raw buffer to remarks::Remark objects. More... | |
struct | RemarkSerializer |
This is the base class for a remark serializer. More... | |
struct | StringTable |
The string table used for serializing remarks. More... | |
struct | YAMLMetaSerializer |
class | YAMLParseError |
struct | YAMLRemarkParser |
Regular YAML to Remark parser. More... | |
struct | YAMLRemarkSerializer |
Serialize the remarks to YAML. More... | |
struct | YAMLStrTabMetaSerializer |
struct | YAMLStrTabRemarkParser |
YAML with a string table to Remark parser. More... | |
struct | YAMLStrTabRemarkSerializer |
Serialize the remarks to YAML using a string table. More... | |
Variables | |
constexpr uint64_t | CurrentContainerVersion = 0 |
The current version of the remark container. More... | |
constexpr StringRef | MetaBlockName = StringRef("Meta", 4) |
constexpr StringRef | RemarkBlockName = StringRef("Remark", 6) |
constexpr StringRef | MetaContainerInfoName = StringRef("Container info", 14) |
constexpr StringRef | MetaRemarkVersionName = StringRef("Remark version", 14) |
constexpr StringRef | MetaStrTabName = StringRef("String table", 12) |
constexpr StringRef | MetaExternalFileName = StringRef("External File", 13) |
constexpr StringRef | RemarkHeaderName = StringRef("Remark header", 13) |
constexpr StringRef | RemarkDebugLocName = StringRef("Remark debug location", 21) |
constexpr StringRef | RemarkHotnessName = StringRef("Remark hotness", 14) |
constexpr StringRef | RemarkArgWithDebugLocName |
constexpr StringRef | RemarkArgWithoutDebugLocName = StringRef("Argument", 8) |
constexpr uint64_t | CurrentRemarkVersion = 0 |
The current version of the remark entry. More... | |
|
strong |
Type of the remark container.
The remark container has two modes:
Enumerator | |
---|---|
SeparateRemarksMeta | The metadata emitted separately. This will contain the following:
|
SeparateRemarksFile | The remarks emitted separately. This will contain the following:
|
Standalone | Everything is emitted together. This will contain the following:
|
First | |
Last |
Definition at line 35 of file BitstreamRemarkContainer.h.
The possible blocks that will be encountered in a bitstream remark container.
Definition at line 59 of file BitstreamRemarkContainer.h.
|
strong |
The format used for serializing/deserializing remarks.
Enumerator | |
---|---|
Unknown | |
YAML | |
YAMLStrTab | |
Bitstream |
Definition at line 25 of file RemarkFormat.h.
The possible records that can be encountered in the previously described blocks.
Definition at line 75 of file BitstreamRemarkContainer.h.
|
strong |
Enumerator | |
---|---|
Separate | |
Standalone |
Definition at line 24 of file RemarkSerializer.h.
|
strong |
constexpr StringLiteral llvm::remarks::ContainerMagic | ( | "RMRK" | ) |
The magic number used for identifying remark blocks.
Referenced by llvm::remarks::BitstreamRemarkSerializerHelper::setupBlockInfo(), and validateMagicNumber().
Expected< std::unique_ptr< BitstreamRemarkParser > > llvm::remarks::createBitstreamParserFromMeta | ( | StringRef | Buf, |
Optional< ParsedStringTable > | StrTab = None , |
||
Optional< StringRef > | ExternalFilePrependPath = None |
||
) |
Definition at line 308 of file BitstreamRemarkParser.cpp.
References E, Magic(), llvm::remarks::BitstreamParserHelper::parseMagic(), llvm::Expected< T >::takeError(), and validateMagicNumber().
Referenced by llvm::remarks::BitstreamRemarkParser::classof(), and createRemarkParserFromMeta().
Expected< std::unique_ptr< RemarkParser > > llvm::remarks::createRemarkParser | ( | Format | ParserFormat, |
StringRef | Buf | ||
) |
Definition at line 52 of file RemarkParser.cpp.
References Bitstream, llvm::createStringError(), llvm_unreachable, llvm::make_error_code(), Unknown, YAML, and YAMLStrTab.
Referenced by llvm::remarks::ParsedStringTable::size().
Expected< std::unique_ptr< RemarkParser > > llvm::remarks::createRemarkParser | ( | Format | ParserFormat, |
StringRef | Buf, | ||
ParsedStringTable | StrTab | ||
) |
Definition at line 70 of file RemarkParser.cpp.
References Bitstream, llvm::createStringError(), llvm_unreachable, llvm::make_error_code(), Unknown, YAML, and YAMLStrTab.
Expected< std::unique_ptr< RemarkParser > > llvm::remarks::createRemarkParserFromMeta | ( | Format | ParserFormat, |
StringRef | Buf, | ||
Optional< ParsedStringTable > | StrTab = None , |
||
Optional< StringRef > | ExternalFilePrependPath = None |
||
) |
Definition at line 89 of file RemarkParser.cpp.
References Bitstream, createBitstreamParserFromMeta(), llvm::createStringError(), createYAMLParserFromMeta(), llvm_unreachable, llvm::make_error_code(), Unknown, YAML, and YAMLStrTab.
Referenced by llvm::remarks::ParsedStringTable::size().
Expected< std::unique_ptr< RemarkSerializer > > llvm::remarks::createRemarkSerializer | ( | Format | RemarksFormat, |
SerializerMode | Mode, | ||
raw_ostream & | OS | ||
) |
Create a remark serializer.
Definition at line 21 of file RemarkSerializer.cpp.
References Bitstream, llvm::createStringError(), llvm_unreachable, Mode, Unknown, YAML, and YAMLStrTab.
Referenced by llvm::remarks::MetaSerializer::MetaSerializer(), and llvm::setupOptimizationRemarks().
Expected< std::unique_ptr< RemarkSerializer > > llvm::remarks::createRemarkSerializer | ( | Format | RemarksFormat, |
SerializerMode | Mode, | ||
raw_ostream & | OS, | ||
remarks::StringTable | StrTab | ||
) |
Create a remark serializer that uses a pre-filled string table.
Definition at line 38 of file RemarkSerializer.cpp.
References Bitstream, llvm::createStringError(), llvm_unreachable, Mode, Unknown, YAML, and YAMLStrTab.
Expected< std::unique_ptr< YAMLRemarkParser > > llvm::remarks::createYAMLParserFromMeta | ( | StringRef | Buf, |
Optional< ParsedStringTable > | StrTab = None , |
||
Optional< StringRef > | ExternalFilePrependPath = None |
||
) |
Definition at line 112 of file YAMLRemarkParser.cpp.
References llvm::sys::path::append(), llvm::createFileError(), llvm::createStringError(), llvm::ErrorOr< T >::getError(), llvm::MemoryBuffer::getFile(), parseMagic(), parseStrTab(), parseStrTabSize(), parseVersion(), llvm::StringRef::startswith(), llvm::Expected< T >::takeError(), and llvm::IndexedInstrProf::Version.
Referenced by llvm::remarks::YAMLStrTabRemarkParser::classof(), and createRemarkParserFromMeta().
constexpr StringLiteral llvm::remarks::Magic | ( | "REMARKS" | ) |
Referenced by advanceToMetaBlock(), createBitstreamParserFromMeta(), emitMagic(), and parseMagic().
|
inline |
|
inline |
Definition at line 123 of file Remark.h.
References llvm::remarks::Argument::Key, llvm::remarks::Argument::Loc, and llvm::remarks::Argument::Val.
Definition at line 131 of file Remark.h.
References llvm::remarks::Remark::Args, llvm::remarks::Remark::FunctionName, llvm::remarks::Remark::Hotness, llvm::remarks::Remark::Loc, llvm::remarks::Remark::PassName, llvm::remarks::Remark::RemarkName, and llvm::remarks::Remark::RemarkType.
Parse and validate a string for the remark format.
Definition at line 19 of file RemarkFormat.cpp.
References Bitstream, llvm::StringSwitch< T, R >::Case(), llvm::createStringError(), llvm::StringRef::data(), llvm::StringSwitch< T, R >::Default(), llvm::make_error_code(), Unknown, YAML, and YAMLStrTab.
Referenced by llvm::setupOptimizationRemarks().
constexpr uint64_t llvm::remarks::CurrentContainerVersion = 0 |
The current version of the remark container.
Note: this is different from the version of the remark entry.
Definition at line 26 of file BitstreamRemarkContainer.h.
Referenced by llvm::remarks::BitstreamMetaSerializer::emit().
constexpr uint64_t llvm::remarks::CurrentRemarkVersion = 0 |
The current version of the remark entry.
Definition at line 27 of file Remark.h.
Referenced by llvm::remarks::BitstreamMetaSerializer::emit(), emitVersion(), and parseVersion().
Definition at line 70 of file BitstreamRemarkContainer.h.
Referenced by llvm::remarks::BitstreamRemarkSerializerHelper::setupMetaBlockInfo().
Definition at line 92 of file BitstreamRemarkContainer.h.
Referenced by llvm::remarks::BitstreamRemarkSerializerHelper::setupMetaBlockInfo().
Definition at line 95 of file BitstreamRemarkContainer.h.
Referenced by llvm::remarks::BitstreamRemarkSerializerHelper::setupMetaExternalFile().
Definition at line 93 of file BitstreamRemarkContainer.h.
Referenced by llvm::remarks::BitstreamRemarkSerializerHelper::setupMetaRemarkVersion().
Definition at line 94 of file BitstreamRemarkContainer.h.
Referenced by llvm::remarks::BitstreamRemarkSerializerHelper::setupMetaStrTab().
constexpr StringRef llvm::remarks::RemarkArgWithDebugLocName |
Definition at line 99 of file BitstreamRemarkContainer.h.
Referenced by llvm::remarks::BitstreamRemarkSerializerHelper::setupRemarkBlockInfo().
Definition at line 101 of file BitstreamRemarkContainer.h.
Referenced by llvm::remarks::BitstreamRemarkSerializerHelper::setupRemarkBlockInfo().
Definition at line 71 of file BitstreamRemarkContainer.h.
Referenced by llvm::remarks::BitstreamRemarkSerializerHelper::setupRemarkBlockInfo().
Definition at line 97 of file BitstreamRemarkContainer.h.
Referenced by llvm::remarks::BitstreamRemarkSerializerHelper::setupRemarkBlockInfo().
Definition at line 96 of file BitstreamRemarkContainer.h.
Referenced by llvm::remarks::BitstreamRemarkSerializerHelper::setupRemarkBlockInfo().
Definition at line 98 of file BitstreamRemarkContainer.h.
Referenced by llvm::remarks::BitstreamRemarkSerializerHelper::setupRemarkBlockInfo().