MLIR  19.0.0git
Public Types | Public Member Functions | List of all members
mlir::BytecodeDialectInterface Class Reference

#include "mlir/Bytecode/BytecodeImplementation.h"

+ Inheritance diagram for mlir::BytecodeDialectInterface:

Public Types

using Base = DialectInterfaceBase< ConcreteType, BaseT >
 
- Public Types inherited from mlir::detail::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 Type readType (DialectBytecodeReader &reader) const
 Read a type 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< DialectVersionreadVersion (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 Public Member Functions inherited from mlir::detail::DialectInterfaceBase< ConcreteType, BaseT >
static TypeID getInterfaceID ()
 Get a unique id for the derived interface type. More...
 
- Protected Member Functions inherited from mlir::detail::DialectInterfaceBase< ConcreteType, BaseT >
 DialectInterfaceBase (Dialect *dialect)
 

Detailed Description

Definition at line 422 of file BytecodeImplementation.h.

Member Typedef Documentation

◆ Base

using mlir::detail::DialectInterfaceBase< ConcreteType, BaseT >::Base = DialectInterfaceBase<ConcreteType, BaseT>

Definition at line 30 of file DialectInterface.h.

Member Function Documentation

◆ readAttribute()

virtual Attribute mlir::BytecodeDialectInterface::readAttribute ( DialectBytecodeReader reader) const
inlinevirtual

Read an attribute belonging to this dialect from the given reader.

This method should return null in the case of failure. Optionally, the dialect version can be accessed through the reader.

Definition at line 434 of file BytecodeImplementation.h.

References mlir::DialectBytecodeReader::emitError().

◆ readType()

virtual Type mlir::BytecodeDialectInterface::readType ( DialectBytecodeReader reader) const
inlinevirtual

Read a type belonging to this dialect from the given reader.

This method should return null in the case of failure. Optionally, the dialect version can be accessed thorugh the reader.

Definition at line 443 of file BytecodeImplementation.h.

References mlir::DialectBytecodeReader::emitError().

◆ readVersion()

virtual std::unique_ptr<DialectVersion> mlir::BytecodeDialectInterface::readVersion ( DialectBytecodeReader reader) const
inlinevirtual

◆ upgradeFromVersion()

virtual LogicalResult mlir::BytecodeDialectInterface::upgradeFromVersion ( Operation topLevelOp,
const DialectVersion version 
) const
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 487 of file BytecodeImplementation.h.

References mlir::success().

◆ writeAttribute()

virtual LogicalResult mlir::BytecodeDialectInterface::writeAttribute ( Attribute  attr,
DialectBytecodeWriter writer 
) const
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 457 of file BytecodeImplementation.h.

References mlir::failure().

◆ writeType()

virtual LogicalResult mlir::BytecodeDialectInterface::writeType ( Type  type,
DialectBytecodeWriter writer 
) const
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 466 of file BytecodeImplementation.h.

References mlir::failure().

◆ writeVersion()

virtual void mlir::BytecodeDialectInterface::writeVersion ( DialectBytecodeWriter writer) const
inlinevirtual

Write the version of this dialect to the given writer.

Definition at line 472 of file BytecodeImplementation.h.


The documentation for this class was generated from the following file: