MLIR
20.0.0git
|
A class to interact with the attributes and types printer when emitting MLIR bytecode. More...
#include "mlir/Bytecode/BytecodeWriter.h"
Public Member Functions | |
AttrTypeBytecodeWriter ()=default | |
virtual | ~AttrTypeBytecodeWriter ()=default |
virtual LogicalResult | write (T entry, std::optional< StringRef > &name, DialectBytecodeWriter &writer)=0 |
Callback writer API used in IRNumbering, where groups are created and type/attribute components are numbered. More... | |
LogicalResult | write (T entry, DialectBytecodeWriter &writer) |
Callback writer API used in BytecodeWriter, where groups are created and type/attribute components are numbered. More... | |
Static Public Member Functions | |
template<typename CallableT , std::enable_if_t< std::is_convertible_v< CallableT, std::function< LogicalResult(T, std::optional< StringRef > &, DialectBytecodeWriter &)>> , bool > | |
static std::unique_ptr< AttrTypeBytecodeWriter< T > > | fromCallable (CallableT &&writeFn) |
Return an Attribute/Type printer implemented via the given callable, whose form should match that of the write function above. More... | |
A class to interact with the attributes and types printer when emitting MLIR bytecode.
Definition at line 27 of file BytecodeWriter.h.
|
default |
Referenced by mlir::AttrTypeBytecodeWriter< T >::fromCallable().
|
virtualdefault |
|
inlinestatic |
Return an Attribute/Type printer implemented via the given callable, whose form should match that of the write
function above.
Definition at line 57 of file BytecodeWriter.h.
References mlir::AttrTypeBytecodeWriter< T >::AttrTypeBytecodeWriter(), and mlir::AttrTypeBytecodeWriter< T >::write().
|
inline |
Callback writer API used in BytecodeWriter, where groups are created and type/attribute components are numbered.
Here, DialectBytecodeWriter is expected to be an actual writer. The optional stringref specified by the user is ignored, since the group was already specified when numbering the IR.
Definition at line 43 of file BytecodeWriter.h.
References mlir::AttrTypeBytecodeWriter< T >::write().
|
pure virtual |
Callback writer API used in IRNumbering, where groups are created and type/attribute components are numbered.
At this stage, writer is expected to be a NumberingDialectWriter
.
Referenced by mlir::AttrTypeBytecodeWriter< T >::fromCallable(), and mlir::AttrTypeBytecodeWriter< T >::write().