MLIR
20.0.0git
|
#include "mlir/IR/OpImplementation.h"
Public Types | |
enum class | AliasResult { NoAlias , OverridableAlias , FinalAlias } |
Holds the result of getAlias hook call. More... | |
Public Types inherited from mlir::detail::DialectInterfaceBase< ConcreteType, BaseT > | |
using | Base = DialectInterfaceBase< ConcreteType, BaseT > |
Public Member Functions | |
OpAsmDialectInterface (Dialect *dialect) | |
virtual AliasResult | getAlias (Attribute attr, raw_ostream &os) const |
Hooks for getting an alias identifier alias for a given symbol, that is not necessarily a part of this dialect. More... | |
virtual AliasResult | getAlias (Type type, raw_ostream &os) const |
virtual FailureOr< AsmDialectResourceHandle > | declareResource (StringRef key) const |
Declare a resource with the given key, returning a handle to use for any references of this resource key within the IR during parsing. More... | |
virtual std::string | getResourceKey (const AsmDialectResourceHandle &handle) const |
Return a key to use for the given resource. More... | |
virtual LogicalResult | parseResource (AsmParsedResourceEntry &entry) const |
Hook for parsing resource entries. More... | |
virtual void | buildResources (Operation *op, const SetVector< AsmDialectResourceHandle > &referencedResources, AsmResourceBuilder &builder) const |
Hook for building resources to use during printing. 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) | |
Definition at line 1738 of file OpImplementation.h.
|
strong |
Holds the result of getAlias
hook call.
Definition at line 1748 of file OpImplementation.h.
|
inline |
Definition at line 1741 of file OpImplementation.h.
|
inlinevirtual |
Hook for building resources to use during printing.
The given op
may be inspected to help determine what information to include. referencedResources
contains all of the resources detected when printing 'op'.
Definition at line 1801 of file OpImplementation.h.
|
inlinevirtual |
Declare a resource with the given key, returning a handle to use for any references of this resource key within the IR during parsing.
The result of getResourceKey
on the returned handle is permitted to be different than key
.
Definition at line 1779 of file OpImplementation.h.
Referenced by mlir::detail::Parser::parseResourceHandle().
|
inlinevirtual |
Hooks for getting an alias identifier alias for a given symbol, that is not necessarily a part of this dialect.
The identifier is used in place of the symbol when printing textual IR. These aliases must not contain .
or end with a numeric digit([0-9]+).
Definition at line 1763 of file OpImplementation.h.
References NoAlias.
|
inlinevirtual |
Definition at line 1766 of file OpImplementation.h.
References NoAlias.
|
inlinevirtual |
Return a key to use for the given resource.
This key should uniquely identify this resource within the dialect.
Definition at line 1786 of file OpImplementation.h.
Referenced by mlir::detail::Parser::parseResourceHandle(), and mlir::AsmPrinter::Impl::printResourceHandle().
|
virtual |
Hook for parsing resource entries.
The OpAsmOpInterface, see OpAsmInterface.td for more details.
Returns failure if the entry was not valid, or could otherwise not be processed correctly. Any necessary errors can be emitted via the provided entry.
Definition at line 131 of file AsmPrinter.cpp.
References mlir::AsmParsedResourceEntry::emitError(), and mlir::AsmParsedResourceEntry::getKey().