My Project
|
#include <OperationSupport.h>
Public Types | |
using | OperationProperties = uint32_t |
Public Member Functions | |
bool | hasProperty (OperationProperty property) const |
Returns whether the operation has a particular property. More... | |
template<typename T > | |
T::Concept * | getInterface () const |
template<template< typename T > class Trait> | |
bool | hasTrait () const |
Returns if the operation has a particular trait. More... | |
Static Public Member Functions | |
static const AbstractOperation * | lookup (StringRef opName, MLIRContext *context) |
template<typename T > | |
static AbstractOperation | get (Dialect &dialect) |
Public Attributes | |
const StringRef | name |
This is the name of the operation. More... | |
Dialect & | dialect |
This is the dialect that this operation belongs to. More... | |
bool(&) | classof (Operation *op) |
Return true if this "op class" can match against the specified operation. More... | |
ParseResult(&) | parseAssembly (OpAsmParser &parser, OperationState &result) |
Use the specified object to parse this ops custom assembly format. More... | |
void(&) | printAssembly (Operation *op, OpAsmPrinter &p) |
This hook implements the AsmPrinter for this operation. More... | |
LogicalResult(&) | verifyInvariants (Operation *op) |
LogicalResult(&) | foldHook (Operation *op, ArrayRef< Attribute > operands, SmallVectorImpl< OpFoldResult > &results) |
void(&) | getCanonicalizationPatterns (OwningRewritePatternList &results, MLIRContext *context) |
This is a "type erased" representation of a registered operation. This should only be used by things like the AsmPrinter and other things that need to be parameterized by generic operation hooks. Most user code should use the concrete operation types.
using mlir::AbstractOperation::OperationProperties = uint32_t |
|
inlinestatic |
This constructor is used by Dialect objects when they register the list of operations they contain.
|
inline |
Returns an instance of the concept object for the given interface if it was registered to this operation, null otherwise. This should not be used directly.
|
inline |
Returns whether the operation has a particular property.
|
inline |
Returns if the operation has a particular trait.
|
static |
Look up the specified operation in the specified MLIRContext and return a pointer to it if present. Otherwise, return a null pointer.
Look up the specified operation in the operation set and return a pointer to it if present. Otherwise, return a null pointer.
bool(&) mlir::AbstractOperation::classof(Operation *op) |
Return true if this "op class" can match against the specified operation.
Dialect& mlir::AbstractOperation::dialect |
This is the dialect that this operation belongs to.
LogicalResult(&) mlir::AbstractOperation::foldHook(Operation *op, ArrayRef< Attribute > operands, SmallVectorImpl< OpFoldResult > &results) |
This hook implements a generalized folder for this operation. Operations can implement this to provide simplifications rules that are applied by the Builder::createOrFold API and the canonicalization pass.
This is an intentionally limited interface - implementations of this hook can only perform the following changes to the operation:
This allows expression of some simple in-place canonicalizations (e.g. "x+0 -> x", "min(x,y,x,z) -> min(x,y,z)", "x+y-x -> y", etc), as well as generalized constant folding.
void(&) mlir::AbstractOperation::getCanonicalizationPatterns(OwningRewritePatternList &results, MLIRContext *context) |
This hook returns any canonicalization pattern rewrites that the operation supports, for use by the canonicalization pass.
const StringRef mlir::AbstractOperation::name |
This is the name of the operation.
ParseResult(&) mlir::AbstractOperation::parseAssembly(OpAsmParser &parser, OperationState &result) |
Use the specified object to parse this ops custom assembly format.
void(&) mlir::AbstractOperation::printAssembly(Operation *op, OpAsmPrinter &p) |
This hook implements the AsmPrinter for this operation.
LogicalResult(&) mlir::AbstractOperation::verifyInvariants(Operation *op) |
This hook implements the verifier for this operation. It should emits an error message and returns failure if a problem is detected, or returns success if everything is ok.