Go to the documentation of this file.
48 auto P = StringToId.
insert({
S, StringSize});
53 IdToString.insert({
P.first->getValue(),
P.first->getKey()});
54 StringSize +=
S.size() + 1;
57 return P.first->second;
72 for (
auto &Pair : StringToId) {
74 uint32_t Offset = Begin + Pair.getValue();
82 assert((End - Begin) == StringSize);
89 std::vector<uint32_t> Result;
90 Result.reserve(IdToString.size());
91 for (
const auto &Entry : IdToString)
92 Result.push_back(Entry.first);
98 auto Iter = StringToId.
find(
S);
104 auto Iter = IdToString.find(
Id);
105 assert(Iter != IdToString.end());
void setOffset(uint64_t Off)
This is an optimization pass for GlobalISel generic memory operations.
uint32_t calculateSerializedSize() const override
This currently compiles esp xmm0 movsd esp eax eax esp ret We should use not the dag combiner This is because dagcombine2 needs to be able to see through the X86ISD::Wrapper which DAGCombine can t really do The code for turning x load into a single vector load is target independent and should be moved to the dag combiner The code for turning x load into a vector load can only handle a direct load from a global or a direct load from the stack It should be generalized to handle any load from P
Provides write only access to a subclass of WritableBinaryStream.
uint32_t insert(StringRef S)
static ErrorSuccess success()
Create a success value.
DebugStringTableSubsectionRef()
void setOffset(uint64_t Off)
Tagged union holding either a T or a Error.
iterator find(StringRef Key)
Error initialize(BinaryStreamRef Contents)
bool insert(MapEntryTy *KeyValue)
insert - Insert the specified key/value pair into the map.
Error readStreamRef(BinaryStreamRef &Ref)
Read the entire remainder of the underlying stream into Ref.
Provides read only access to a subclass of BinaryStream.
StringRef getStringForId(uint32_t Id) const
Error readCString(StringRef &Dest)
Read a null terminated string from Dest.
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
uint64_t getOffset() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Error writeCString(StringRef Str)
Write the string Str to the underlying stream followed by a null terminator.
std::vector< uint32_t > sortedIds() const
StringRef - Represent a constant reference to a string, i.e.
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Lightweight error class with error context and mandatory checking.
DebugStringTableSubsection()
void sort(IteratorTy Start, IteratorTy End)
Error commit(BinaryStreamWriter &Writer) const override
Expected< StringRef > getString(uint32_t Offset) const
uint32_t getIdForString(StringRef S) const
BinaryStreamRef is to BinaryStream what ArrayRef is to an Array.