MLIR
17.0.0git
|
#include "mlir/Bytecode/BytecodeImplementation.h"
Public Types | |
using | Base = DialectInterfaceBase< ConcreteType, BaseT > |
![]() | |
using | Base = DialectInterfaceBase< ConcreteType, BaseT > |
Public Member Functions | |
virtual Attribute | readAttribute (DialectBytecodeReader &reader) const |
Read an attribute belonging to this dialect from the given reader. More... | |
virtual Attribute | readAttribute (DialectBytecodeReader &reader, const DialectVersion &version) const |
Read a versioned attribute encoding belonging to this dialect from the given reader. More... | |
virtual Type | readType (DialectBytecodeReader &reader) const |
Read a type belonging to this dialect from the given reader. More... | |
virtual Type | readType (DialectBytecodeReader &reader, const DialectVersion &version) const |
Read a versioned type encoding belonging to this dialect from the given reader. More... | |
virtual LogicalResult | writeAttribute (Attribute attr, DialectBytecodeWriter &writer) const |
Write the given attribute, which belongs to this dialect, to the given writer. More... | |
virtual LogicalResult | writeType (Type type, DialectBytecodeWriter &writer) const |
Write the given type, which belongs to this dialect, to the given writer. More... | |
virtual void | writeVersion (DialectBytecodeWriter &writer) const |
Write the version of this dialect to the given writer. More... | |
virtual std::unique_ptr< DialectVersion > | readVersion (DialectBytecodeReader &reader) const |
virtual LogicalResult | upgradeFromVersion (Operation *topLevelOp, const DialectVersion &version) const |
Hook invoked after parsing completed, if a version directive was present and included an entry for the current dialect. More... | |
Additional Inherited Members | |
![]() | |
static TypeID | getInterfaceID () |
Get a unique id for the derived interface type. More... | |
![]() | |
DialectInterfaceBase (Dialect *dialect) | |
Definition at line 253 of file BytecodeImplementation.h.
using mlir::detail::DialectInterfaceBase< ConcreteType, BaseT >::Base = DialectInterfaceBase<ConcreteType, BaseT> |
Definition at line 30 of file DialectInterface.h.
|
inlinevirtual |
Read an attribute belonging to this dialect from the given reader.
This method should return null in the case of failure.
Definition at line 264 of file BytecodeImplementation.h.
References mlir::DialectBytecodeReader::emitError().
|
inlinevirtual |
Read a versioned attribute encoding belonging to this dialect from the given reader.
This method should return null in the case of failure, and falls back to the non-versioned reader in case the dialect implements versioning but it does not support versioned custom encodings for the attributes.
Definition at line 275 of file BytecodeImplementation.h.
References mlir::DialectBytecodeReader::emitError().
|
inlinevirtual |
Read a type belonging to this dialect from the given reader.
This method should return null in the case of failure.
Definition at line 285 of file BytecodeImplementation.h.
References mlir::DialectBytecodeReader::emitError().
|
inlinevirtual |
Read a versioned type encoding belonging to this dialect from the given reader.
This method should return null in the case of failure, and falls back to the non-versioned reader in case the dialect implements versioning but it does not support versioned custom encodings for the types.
Definition at line 296 of file BytecodeImplementation.h.
References mlir::DialectBytecodeReader::emitError().
|
inlinevirtual |
Definition at line 332 of file BytecodeImplementation.h.
References mlir::DialectBytecodeReader::emitError().
|
inlinevirtual |
Hook invoked after parsing completed, if a version directive was present and included an entry for the current dialect.
This hook offers the opportunity to the dialect to visit the IR and upgrades constructs emitted by the version of the dialect corresponding to the provided version.
Definition at line 342 of file BytecodeImplementation.h.
References mlir::success().
|
inlinevirtual |
Write the given attribute, which belongs to this dialect, to the given writer.
This method may return failure to indicate that the given attribute could not be encoded, in which case the textual format will be used to encode this attribute instead.
Definition at line 312 of file BytecodeImplementation.h.
References mlir::failure().
|
inlinevirtual |
Write the given type, which belongs to this dialect, to the given writer.
This method may return failure to indicate that the given type could not be encoded, in which case the textual format will be used to encode this type instead.
Definition at line 321 of file BytecodeImplementation.h.
References mlir::failure().
|
inlinevirtual |
Write the version of this dialect to the given writer.
Definition at line 327 of file BytecodeImplementation.h.