Go to the documentation of this file.
9 #ifndef LLVM_DEBUGINFO_CODEVIEW_GLOBALTYPETABLEBUILDER_H
10 #define LLVM_DEBUGINFO_CODEVIEW_GLOBALTYPETABLEBUILDER_H
27 class ContinuationRecordBuilder;
70 template <
typename CreateFunc>
73 assert(RecordSize < UINT32_MAX &&
"Record too big");
74 assert(RecordSize % 4 == 0 &&
75 "RecordSize is not a multiple of 4 bytes which will cause "
76 "misalignment in the output TPI stream!");
81 Result.first->second.isSimple())) {
82 uint8_t *Stable = RecordStorage.
Allocate<uint8_t>(RecordSize);
85 if (StableRecord.
empty()) {
91 if (Result.first->second.isSimple()) {
92 assert(Result.first->second.getIndex() ==
100 SeenRecords.push_back(StableRecord);
101 SeenHashes.push_back(Hash);
104 return Result.first->second;
119 #endif // LLVM_DEBUGINFO_CODEVIEW_GLOBALTYPETABLEBUILDER_H
This is an optimization pass for GlobalISel generic memory operations.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
bool empty() const
empty - Check if the array is empty.
bool replaceType(TypeIndex &Index, CVType Data, bool Stabilize) override
GlobalTypeTableBuilder(BumpPtrAllocator &Storage)
A globally hashed type represents a hash value that is sufficient to uniquely identify a record acros...
uint32_t capacity() override
ArrayRef< GloballyHashedType > hashes() const
CVType getType(TypeIndex Index) override
~GlobalTypeTableBuilder()
Allocate memory in an ever growing pool, as if by bump-pointer.
TypeIndex insertRecordAs(GloballyHashedType Hash, size_t RecordSize, CreateFunc Create)
TypeIndex writeLeafType(T &Record)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
StringRef getTypeName(TypeIndex Index) override
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
StringRef - Represent a constant reference to a string, i.e.
Optional< TypeIndex > getFirst() override
TypeIndex insertRecord(ContinuationRecordBuilder &Builder)
LLVM_ATTRIBUTE_RETURNS_NONNULL void * Allocate(size_t Size, Align Alignment)
Allocate space at the specified alignment.
Optional< TypeIndex > getNext(TypeIndex Prev) override
TypeIndex insertRecordBytes(ArrayRef< uint8_t > Data)
ArrayRef< uint8_t > serialize(T &Record)
BumpPtrAllocator & getAllocator()
ArrayRef< ArrayRef< uint8_t > > records() const
std::pair< iterator, bool > try_emplace(KeyT &&Key, Ts &&... Args)
#define LLVM_UNLIKELY(EXPR)
bool contains(TypeIndex Index) override
TypeIndex nextTypeIndex() const