LLVM
22.0.0git
include
llvm
Remarks
BitstreamRemarkContainer.h
Go to the documentation of this file.
1
//===-- BitstreamRemarkContainer.h - Container for remarks --------------*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// This file provides declarations for things used in the various types of
10
// remark containers.
11
//
12
//===----------------------------------------------------------------------===//
13
14
#ifndef LLVM_REMARKS_BITSTREAMREMARKCONTAINER_H
15
#define LLVM_REMARKS_BITSTREAMREMARKCONTAINER_H
16
17
#include "
llvm/ADT/StringRef.h
"
18
#include "
llvm/Bitstream/BitCodes.h
"
19
#include <cstdint>
20
21
namespace
llvm
{
22
namespace
remarks
{
23
24
/// The current version of the remark container.
25
/// Note: this is different from the version of the remark entry.
26
constexpr
uint64_t
CurrentContainerVersion
= 1;
27
/// The magic number used for identifying remark blocks.
28
constexpr
StringLiteral
ContainerMagic
(
"RMRK"
);
29
30
/// Type of the remark container.
31
enum class
BitstreamRemarkContainerType
{
32
/// Emit a link to an external remarks file
33
/// (usually as a section of the object file, to enable discovery of all
34
/// remarks files from the final linked object file)
35
/// RemarksFileExternal:
36
/// | Meta:
37
/// | | Container info
38
/// | | External file
39
RemarksFileExternal
,
40
/// Emit metadata and remarks into a file
41
/// RemarksFile:
42
/// | Meta:
43
/// | | Container info
44
/// | | Remark version
45
/// | Remarks:
46
/// | | Remark0
47
/// | | Remark1
48
/// | | Remark2
49
/// | | ...
50
/// | Late Meta:
51
/// | | String table
52
RemarksFile
,
53
First
=
RemarksFileExternal
,
54
Last
=
RemarksFile
55
};
56
57
/// The possible blocks that will be encountered in a bitstream remark
58
/// container.
59
enum
BlockIDs
{
60
/// The metadata block is mandatory. It should always come after the
61
/// BLOCKINFO_BLOCK, and contains metadata that should be used when parsing
62
/// REMARK_BLOCKs.
63
/// There should always be only one META_BLOCK.
64
META_BLOCK_ID
=
bitc::FIRST_APPLICATION_BLOCKID
,
65
/// One remark entry is represented using a REMARK_BLOCK. There can be
66
/// multiple REMARK_BLOCKs in the same file.
67
REMARK_BLOCK_ID
68
};
69
70
constexpr
StringLiteral
MetaBlockName
(
"Meta"
);
71
constexpr
StringLiteral
RemarkBlockName
(
"Remark"
);
72
73
/// The possible records that can be encountered in the previously described
74
/// blocks.
75
enum
RecordIDs
{
76
// Meta block records.
77
RECORD_META_CONTAINER_INFO
= 1,
78
RECORD_META_REMARK_VERSION
,
79
RECORD_META_STRTAB
,
80
RECORD_META_EXTERNAL_FILE
,
81
// Remark block records.
82
RECORD_REMARK_HEADER
,
83
RECORD_REMARK_DEBUG_LOC
,
84
RECORD_REMARK_HOTNESS
,
85
RECORD_REMARK_ARG_WITH_DEBUGLOC
,
86
RECORD_REMARK_ARG_WITHOUT_DEBUGLOC
,
87
// Helpers.
88
RECORD_FIRST
=
RECORD_META_CONTAINER_INFO
,
89
RECORD_LAST
=
RECORD_REMARK_ARG_WITHOUT_DEBUGLOC
90
};
91
92
constexpr
StringLiteral
MetaContainerInfoName
(
"Container info"
);
93
constexpr
StringLiteral
MetaRemarkVersionName
(
"Remark version"
);
94
constexpr
StringLiteral
MetaStrTabName
(
"String table"
);
95
constexpr
StringLiteral
MetaExternalFileName
(
"External File"
);
96
constexpr
StringLiteral
RemarkHeaderName
(
"Remark header"
);
97
constexpr
StringLiteral
RemarkDebugLocName
(
"Remark debug location"
);
98
constexpr
StringLiteral
RemarkHotnessName
(
"Remark hotness"
);
99
constexpr
StringLiteral
100
RemarkArgWithDebugLocName
(
"Argument with debug location"
);
101
constexpr
StringLiteral
RemarkArgWithoutDebugLocName
(
"Argument"
);
102
103
}
// end namespace remarks
104
}
// end namespace llvm
105
106
#endif
// LLVM_REMARKS_BITSTREAMREMARKCONTAINER_H
BitCodes.h
StringRef.h
llvm::StringLiteral
A wrapper around a string literal that serves as a proxy for constructing global tables of StringRefs...
Definition
StringRef.h:854
uint64_t
llvm::bitc::FIRST_APPLICATION_BLOCKID
@ FIRST_APPLICATION_BLOCKID
Definition
BitCodeEnums.h:72
llvm::remarks
Definition
AsmPrinter.h:85
llvm::remarks::RemarkDebugLocName
constexpr StringLiteral RemarkDebugLocName("Remark debug location")
llvm::remarks::BitstreamRemarkContainerType
BitstreamRemarkContainerType
Type of the remark container.
Definition
BitstreamRemarkContainer.h:31
llvm::remarks::BitstreamRemarkContainerType::RemarksFileExternal
@ RemarksFileExternal
Emit a link to an external remarks file (usually as a section of the object file, to enable discovery...
Definition
BitstreamRemarkContainer.h:39
llvm::remarks::BitstreamRemarkContainerType::First
@ First
Definition
BitstreamRemarkContainer.h:53
llvm::remarks::BitstreamRemarkContainerType::Last
@ Last
Definition
BitstreamRemarkContainer.h:54
llvm::remarks::BitstreamRemarkContainerType::RemarksFile
@ RemarksFile
Emit metadata and remarks into a file RemarksFile: | Meta: | | Container info | | Remark version | Re...
Definition
BitstreamRemarkContainer.h:52
llvm::remarks::RemarkArgWithDebugLocName
constexpr StringLiteral RemarkArgWithDebugLocName("Argument with debug location")
llvm::remarks::BlockIDs
BlockIDs
The possible blocks that will be encountered in a bitstream remark container.
Definition
BitstreamRemarkContainer.h:59
llvm::remarks::REMARK_BLOCK_ID
@ REMARK_BLOCK_ID
One remark entry is represented using a REMARK_BLOCK.
Definition
BitstreamRemarkContainer.h:67
llvm::remarks::META_BLOCK_ID
@ META_BLOCK_ID
The metadata block is mandatory.
Definition
BitstreamRemarkContainer.h:64
llvm::remarks::CurrentContainerVersion
constexpr uint64_t CurrentContainerVersion
The current version of the remark container.
Definition
BitstreamRemarkContainer.h:26
llvm::remarks::MetaExternalFileName
constexpr StringLiteral MetaExternalFileName("External File")
llvm::remarks::MetaRemarkVersionName
constexpr StringLiteral MetaRemarkVersionName("Remark version")
llvm::remarks::MetaContainerInfoName
constexpr StringLiteral MetaContainerInfoName("Container info")
llvm::remarks::RemarkHeaderName
constexpr StringLiteral RemarkHeaderName("Remark header")
llvm::remarks::MetaBlockName
constexpr StringLiteral MetaBlockName("Meta")
llvm::remarks::RemarkArgWithoutDebugLocName
constexpr StringLiteral RemarkArgWithoutDebugLocName("Argument")
llvm::remarks::RemarkBlockName
constexpr StringLiteral RemarkBlockName("Remark")
llvm::remarks::ContainerMagic
constexpr StringLiteral ContainerMagic("RMRK")
The magic number used for identifying remark blocks.
llvm::remarks::MetaStrTabName
constexpr StringLiteral MetaStrTabName("String table")
llvm::remarks::RecordIDs
RecordIDs
The possible records that can be encountered in the previously described blocks.
Definition
BitstreamRemarkContainer.h:75
llvm::remarks::RECORD_META_REMARK_VERSION
@ RECORD_META_REMARK_VERSION
Definition
BitstreamRemarkContainer.h:78
llvm::remarks::RECORD_FIRST
@ RECORD_FIRST
Definition
BitstreamRemarkContainer.h:88
llvm::remarks::RECORD_META_STRTAB
@ RECORD_META_STRTAB
Definition
BitstreamRemarkContainer.h:79
llvm::remarks::RECORD_LAST
@ RECORD_LAST
Definition
BitstreamRemarkContainer.h:89
llvm::remarks::RECORD_REMARK_ARG_WITHOUT_DEBUGLOC
@ RECORD_REMARK_ARG_WITHOUT_DEBUGLOC
Definition
BitstreamRemarkContainer.h:86
llvm::remarks::RECORD_REMARK_ARG_WITH_DEBUGLOC
@ RECORD_REMARK_ARG_WITH_DEBUGLOC
Definition
BitstreamRemarkContainer.h:85
llvm::remarks::RECORD_META_CONTAINER_INFO
@ RECORD_META_CONTAINER_INFO
Definition
BitstreamRemarkContainer.h:77
llvm::remarks::RECORD_REMARK_HOTNESS
@ RECORD_REMARK_HOTNESS
Definition
BitstreamRemarkContainer.h:84
llvm::remarks::RECORD_REMARK_HEADER
@ RECORD_REMARK_HEADER
Definition
BitstreamRemarkContainer.h:82
llvm::remarks::RECORD_REMARK_DEBUG_LOC
@ RECORD_REMARK_DEBUG_LOC
Definition
BitstreamRemarkContainer.h:83
llvm::remarks::RECORD_META_EXTERNAL_FILE
@ RECORD_META_EXTERNAL_FILE
Definition
BitstreamRemarkContainer.h:80
llvm::remarks::RemarkHotnessName
constexpr StringLiteral RemarkHotnessName("Remark hotness")
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition
AddressRanges.h:18
Generated on
for LLVM by
1.14.0