MLIR
20.0.0git
|
Classes | |
class | ConstraintVerifier |
Provides context to the verification of constraints. More... | |
class | Constraint |
Once turned into IRDL verifiers, all constraints are attribute constraints. More... | |
class | IsConstraint |
A constraint that checks that an attribute is equal to a given attribute. More... | |
class | BaseAttrConstraint |
A constraint that checks that an attribute is of a given attribute base (e.g. More... | |
class | BaseTypeConstraint |
A constraint that checks that a type is of a given type base (e.g. More... | |
class | DynParametricAttrConstraint |
A constraint that checks that an attribute is of a specific dynamic attribute definition, and that all of its parameters satisfy the given constraints. More... | |
class | DynParametricTypeConstraint |
A constraint that checks that a type is of a specific dynamic type definition, and that all of its parameters satisfy the given constraints. More... | |
class | AnyOfConstraint |
A constraint checking that one of the given constraints is satisfied. More... | |
class | AllOfConstraint |
A constraint checking that all of the given constraints are satisfied. More... | |
class | AnyAttributeConstraint |
A constraint that is always satisfied. More... | |
struct | RegionConstraint |
A constraint checking that a region satisfies irdl.region requirements. More... | |
Functions | |
llvm::LogicalResult | loadDialects (ModuleOp op) |
Load all the dialects defined in the module. More... | |
Operation * | lookupSymbolNearDialect (SymbolTableCollection &symbolTable, Operation *source, SymbolRefAttr symbol) |
Looks up a symbol from the symbol table containing the source operation's dialect definition operation. More... | |
Operation * | lookupSymbolNearDialect (Operation *source, SymbolRefAttr symbol) |
Looks up a symbol from the symbol table containing the source operation's dialect definition operation. More... | |
llvm::unique_function< LogicalResult(Operation *) const > | createVerifier (OperationOp operation, const DenseMap< irdl::TypeOp, std::unique_ptr< DynamicTypeDefinition >> &typeDefs, const DenseMap< irdl::AttributeOp, std::unique_ptr< DynamicAttrDefinition >> &attrDefs) |
Generate an op verifier function from the given IRDL operation definition. More... | |
llvm::unique_function< LogicalResult(Operation *) const > mlir::irdl::createVerifier | ( | OperationOp | operation, |
const DenseMap< irdl::TypeOp, std::unique_ptr< DynamicTypeDefinition >> & | typeDefs, | ||
const DenseMap< irdl::AttributeOp, std::unique_ptr< DynamicAttrDefinition >> & | attrDefs | ||
) |
Generate an op verifier function from the given IRDL operation definition.
Definition at line 274 of file IRDLLoading.cpp.
References mlir::detail::enumerate(), mlir::Region::getOps(), mlir::Operation::getRegion(), irdlOpVerifier(), and irdlRegionVerifier().
Referenced by loadOperation().
LogicalResult mlir::irdl::loadDialects | ( | ModuleOp | op | ) |
Load all the dialects defined in the module.
Definition at line 659 of file IRDLLoading.cpp.
References mlir::WalkResult::advance(), checkCorrectAnyOf(), getAttrOrTypeVerifier(), mlir::WalkResult::interrupt(), loadEmptyDialects(), loadOperation(), preallocateAttrDefs(), preallocateTypeDefs(), mlir::ExtensibleDialect::registerDynamicAttr(), mlir::ExtensibleDialect::registerDynamicType(), and mlir::WalkResult::wasInterrupted().
Referenced by loadIRDLDialects(), and mlirLoadIRDLDialects().
Looks up a symbol from the symbol table containing the source operation's dialect definition operation.
The source operation must be nested within an IRDL dialect definition operation.
Definition at line 34 of file IRDLSymbols.cpp.
References lookupDialectOp(), and mlir::SymbolTable::lookupNearestSymbolFrom().
Operation * mlir::irdl::lookupSymbolNearDialect | ( | SymbolTableCollection & | symbolTable, |
Operation * | source, | ||
SymbolRefAttr | symbol | ||
) |
Looks up a symbol from the symbol table containing the source operation's dialect definition operation.
The source operation must be nested within an IRDL dialect definition operation. This exploits SymbolTableCollection for better symbol table lookup.
Definition at line 28 of file IRDLSymbols.cpp.
References lookupDialectOp(), and mlir::SymbolTableCollection::lookupNearestSymbolFrom().
Referenced by checkSymbolIsTypeOrAttribute(), and getBases().