My Project
|
#include <OpDefinition.h>
Public Types | |
using | dialect_attr_iterator = Operation::dialect_attr_iterator |
A utility iterator that filters out non-dialect attributes. More... | |
using | dialect_attr_range = Operation::dialect_attr_range |
Public Member Functions | |
operator bool () | |
Ops are pointer-like, so we allow implicit conversion to bool. More... | |
operator Operation * () const | |
This implicitly converts to Operation*. More... | |
Operation * | getOperation () |
Return the operation that this refers to. More... | |
Operation * | getParentOp () |
template<typename OpTy > | |
OpTy | getParentOfType () |
Return the closest surrounding parent operation that is of type 'OpTy'. More... | |
MLIRContext * | getContext () |
Return the context this operation belongs to. More... | |
void | print (raw_ostream &os, OpPrintingFlags flags=llvm::None) |
Print the operation to the given stream. More... | |
void | dump () |
Dump this operation. More... | |
Location | getLoc () |
The source location the operation was defined or derived from. More... | |
void | setLoc (Location loc) |
ArrayRef< NamedAttribute > | getAttrs () |
Return all of the attributes on this operation. More... | |
dialect_attr_range | getDialectAttrs () |
Return a range corresponding to the dialect attributes for this operation. More... | |
dialect_attr_iterator | dialect_attr_begin () |
dialect_attr_iterator | dialect_attr_end () |
Attribute | getAttr (StringRef name) |
Return an attribute with the specified name. More... | |
template<typename AttrClass > | |
AttrClass | getAttrOfType (StringRef name) |
If the operation has an attribute of the specified type, return it. More... | |
void | setAttr (Identifier name, Attribute value) |
void | setAttr (StringRef name, Attribute value) |
void | setAttrs (ArrayRef< NamedAttribute > attributes) |
Set the attributes held by this operation. More... | |
void | setAttrs (NamedAttributeList newAttrs) |
template<typename DialectAttrs > | |
void | setDialectAttrs (DialectAttrs &&attrs) |
Set the dialect attributes for this operation, and preserve all dependent. More... | |
NamedAttributeList::RemoveResult | removeAttr (Identifier name) |
NamedAttributeList::RemoveResult | removeAttr (StringRef name) |
bool | use_empty () |
Return true if there are no users of any results of this operation. More... | |
void | erase () |
Remove this operation from its parent block and delete it. More... | |
InFlightDiagnostic | emitOpError (const Twine &message={}) |
InFlightDiagnostic | emitError (const Twine &message={}) |
InFlightDiagnostic | emitWarning (const Twine &message={}) |
InFlightDiagnostic | emitRemark (const Twine &message={}) |
template<typename FnT , typename RetT = detail::walkResultType<FnT>> | |
RetT | walk (FnT &&callback) |
Static Public Member Functions | |
static void | getCanonicalizationPatterns (OwningRewritePatternList &results, MLIRContext *context) |
Protected Member Functions | |
LogicalResult | verify () |
void | print (OpAsmPrinter &p) |
OpState (Operation *state) | |
Static Protected Member Functions | |
static ParseResult | parse (OpAsmParser &parser, OperationState &result) |
This is the concrete base class that holds the operation pointer and has non-generic methods that only depend on State (to avoid having them instantiated on template types that don't affect them.
This also has the fallback implementations of customization hooks for when they aren't customized.
A utility iterator that filters out non-dialect attributes.
|
inlineexplicitprotected |
Mutability management is handled by the OpWrapper/OpConstWrapper classes, so we can cast it away here.
|
inline |
|
inline |
|
inline |
Dump this operation.
InFlightDiagnostic OpState::emitError | ( | const Twine & | message = {} | ) |
Emit an error about fatal conditions with this operation, reporting up to any diagnostic handlers that may be listening.
InFlightDiagnostic OpState::emitOpError | ( | const Twine & | message = {} | ) |
Emit an error with the op name prefixed, like "'dim' op " which is convenient for verifiers.
InFlightDiagnostic OpState::emitRemark | ( | const Twine & | message = {} | ) |
Emit a remark about this operation, reporting up to any diagnostic handlers that may be listening.
InFlightDiagnostic OpState::emitWarning | ( | const Twine & | message = {} | ) |
Emit a warning about this operation, reporting up to any diagnostic handlers that may be listening.
|
inline |
Remove this operation from its parent block and delete it.
|
inline |
Return an attribute with the specified name.
|
inline |
If the operation has an attribute of the specified type, return it.
|
inline |
Return all of the attributes on this operation.
|
inlinestatic |
This hook returns any canonicalization pattern rewrites that the operation supports, for use by the canonicalization pass.
|
inline |
Return the context this operation belongs to.
|
inline |
Return a range corresponding to the dialect attributes for this operation.
|
inline |
The source location the operation was defined or derived from.
|
inline |
Return the operation that this refers to.
|
inline |
Return the closest surrounding parent operation that is of type 'OpTy'.
|
inline |
Returns the closest surrounding operation that contains this operation or nullptr if this is a top-level operation.
|
inline |
Ops are pointer-like, so we allow implicit conversion to bool.
|
inline |
This implicitly converts to Operation*.
|
staticprotected |
Unless overridden, the custom assembly form of an op is always rejected. Op implementations should implement this to return failure. On success, they should fill in result with the fields to use.
|
inline |
Print the operation to the given stream.
|
protected |
|
inline |
Remove the attribute with the specified name if it exists. The return value indicates whether the attribute was present or not.
|
inline |
|
inline |
If the an attribute exists with the specified name, change it to the new value. Otherwise, add a new attribute with the specified name/value.
|
inline |
|
inline |
Set the attributes held by this operation.
|
inline |
|
inline |
Set the dialect attributes for this operation, and preserve all dependent.
|
inline |
|
inline |
Return true if there are no users of any results of this operation.
|
inlineprotected |
If the concrete type didn't implement a custom verifier hook, just fall back to this one which accepts everything.
|
inline |
Walk the operation in postorder, calling the callback for each nested operation(including this one). See Operation::walk for more details.