MLIR
17.0.0git
|
Public Member Functions | |
NumberingDialectWriter (IRNumberingState &state) | |
void | writeAttribute (Attribute attr) override |
Write a reference to the given attribute. More... | |
void | writeOptionalAttribute (Attribute attr) override |
void | writeType (Type type) override |
Write a reference to the given type. More... | |
void | writeResourceHandle (const AsmDialectResourceHandle &resource) override |
Write the given handle to a dialect resource. More... | |
void | writeVarInt (uint64_t) override |
Stubbed out methods that are not used for numbering. More... | |
void | writeSignedVarInt (int64_t value) override |
Write a signed variable width integer to the output stream. More... | |
void | writeAPIntWithKnownWidth (const APInt &value) override |
Write an APInt to the bytecode stream whose bitwidth will be known externally at read time. More... | |
void | writeAPFloatWithKnownSemantics (const APFloat &value) override |
Write an APFloat to the bytecode stream whose semantics will be known externally at read time. More... | |
void | writeOwnedString (StringRef) override |
Write a string to the bytecode, which is owned by the caller and is guaranteed to not die before the end of the bytecode process. More... | |
void | writeOwnedBlob (ArrayRef< char > blob) override |
Write a blob to the bytecode, which is owned by the caller and is guaranteed to not die before the end of the bytecode process. More... | |
int64_t | getBytecodeVersion () const override |
Return the bytecode version being emitted for. More... | |
![]() | |
virtual | ~DialectBytecodeWriter ()=default |
template<typename RangeT , typename CallbackFn > | |
void | writeList (RangeT &&range, CallbackFn &&callback) |
Write out a list of elements, invoking the provided callback for each element. More... | |
template<typename T > | |
void | writeAttributes (ArrayRef< T > attrs) |
template<typename T > | |
void | writeTypes (ArrayRef< T > types) |
void | writeSignedVarInts (ArrayRef< int64_t > value) |
Public Attributes | |
IRNumberingState & | state |
The parent numbering state that is populated by this writer. More... | |
Definition at line 24 of file IRNumbering.cpp.
|
inline |
Definition at line 25 of file IRNumbering.cpp.
|
inlineoverridevirtual |
Return the bytecode version being emitted for.
Implements mlir::DialectBytecodeWriter.
Definition at line 49 of file IRNumbering.cpp.
|
inlineoverridevirtual |
Write an APFloat to the bytecode stream whose semantics will be known externally at read time.
This method is useful for encoding APFloat values when the semantics are known via external means, such as via a type.
Implements mlir::DialectBytecodeWriter.
Definition at line 41 of file IRNumbering.cpp.
|
inlineoverridevirtual |
Write an APInt to the bytecode stream whose bitwidth will be known externally at read time.
This method is useful for encoding APInt values when the width is known via external means, such as via a type. This method should generally only be invoked if you need an APInt, otherwise use the varint methods above. APInt values are generally encoded using zigzag encoding, to enable more efficient encodings for negative values.
Implements mlir::DialectBytecodeWriter.
Definition at line 40 of file IRNumbering.cpp.
|
inlineoverridevirtual |
Write a reference to the given attribute.
Implements mlir::DialectBytecodeWriter.
Definition at line 27 of file IRNumbering.cpp.
References mlir::bytecode::detail::IRNumberingState::NumberingDialectWriter::state.
|
inlineoverridevirtual |
Implements mlir::DialectBytecodeWriter.
Definition at line 28 of file IRNumbering.cpp.
References mlir::bytecode::detail::IRNumberingState::NumberingDialectWriter::state.
|
inlineoverridevirtual |
Write a blob to the bytecode, which is owned by the caller and is guaranteed to not die before the end of the bytecode process.
The blob is written as-is, with no additional compression or compaction.
Implements mlir::DialectBytecodeWriter.
Definition at line 47 of file IRNumbering.cpp.
|
inlineoverridevirtual |
Write a string to the bytecode, which is owned by the caller and is guaranteed to not die before the end of the bytecode process.
This should only be called if such a guarantee can be made, such as when the string is owned by an attribute or type.
Implements mlir::DialectBytecodeWriter.
Definition at line 42 of file IRNumbering.cpp.
|
inlineoverridevirtual |
Write the given handle to a dialect resource.
Implements mlir::DialectBytecodeWriter.
Definition at line 33 of file IRNumbering.cpp.
References mlir::AsmDialectResourceHandle::getDialect(), and mlir::bytecode::detail::IRNumberingState::NumberingDialectWriter::state.
|
inlineoverridevirtual |
Write a signed variable width integer to the output stream.
This should be the preferred method for emitting signed integers whenever possible.
Implements mlir::DialectBytecodeWriter.
Definition at line 39 of file IRNumbering.cpp.
|
inlineoverridevirtual |
Write a reference to the given type.
Implements mlir::DialectBytecodeWriter.
Definition at line 32 of file IRNumbering.cpp.
References mlir::bytecode::detail::IRNumberingState::NumberingDialectWriter::state.
|
inlineoverridevirtual |
Stubbed out methods that are not used for numbering.
Implements mlir::DialectBytecodeWriter.
Definition at line 38 of file IRNumbering.cpp.
IRNumberingState& mlir::bytecode::detail::IRNumberingState::NumberingDialectWriter::state |
The parent numbering state that is populated by this writer.
Definition at line 54 of file IRNumbering.cpp.
Referenced by mlir::bytecode::detail::IRNumberingState::NumberingDialectWriter::writeAttribute(), mlir::bytecode::detail::IRNumberingState::NumberingDialectWriter::writeOptionalAttribute(), mlir::bytecode::detail::IRNumberingState::NumberingDialectWriter::writeResourceHandle(), and mlir::bytecode::detail::IRNumberingState::NumberingDialectWriter::writeType().