- Dialect: grouping functionality to extend MLIR system by adding new operators, attributes, and types.
- Operations are defined by
- Name
- List of SSA operand values
- List of attributes (MLIR's mechanism for attaching constant metadata to operations)
- List of types for result values
- Source location
- List of successor blocks
- List of regions
- Traits: mechanism to inject additional behavior (accessors, verification, etc) into operators.
- MLIR allows undefined operations to be manipulated through opaque
Operaton
class.
RewritePattern
s are used to represent term rewrites.- Canonicalization framework: used to reduce operations to canonical forms.
- MLIR declares abstract classes for high level transformations which can be defined on operation specific derived classes.
- DialectInlinerInterface
DialectConversion
framework is used to convert operations from one dialect to another.- To use the
DialectConversion
framework, we provide it with two things:- A specification of what operations are legal and illegal, used to decide what to convert and what to not.
- A set of patterns used to convert illegal operations into a set of zero or more legal operations.
DialectConversion
framework also usesRewritePattern
s, it uses a derived class calledConversionPattern
.
- Spelunk adaptor TransposeOpAdaptor
- Spelunk helper lowerOpToLoops
- LLVMDialect
- TypeConverter