/// Create a new Dialect that is registered on construction and adds the
/// relevant types and operations.
explicit LinalgDialect(mlir::MLIRContext *context);
+ static llvm::StringRef getDialectNamespace() { return "linalg"; }
/// Parse a type registered to this dialect.
mlir::Type parseType(llvm::StringRef spec, mlir::Location loc) const override;
using namespace linalg;
LinalgDialect::LinalgDialect(MLIRContext *context)
- : Dialect("linalg", context) {
+ : Dialect(getDialectNamespace(), context) {
addTypes<RangeType, ViewType>();
addOperations<RangeOp, SliceOp, ViewOp>();
}
class AffineOpsDialect : public Dialect {
public:
AffineOpsDialect(MLIRContext *context);
+ static StringRef getDialectNamespace() { return "affine"; }
};
/// The "affine.apply" operation applies an affine map to a list of operands,
class StandardOpsDialect : public Dialect {
public:
StandardOpsDialect(MLIRContext *context);
+ static StringRef getDialectNamespace() { return "std"; }
};
/// The predicate indicates the type of the comparison to perform:
//===----------------------------------------------------------------------===//
AffineOpsDialect::AffineOpsDialect(MLIRContext *context)
- : Dialect(/*name=*/"affine", context) {
+ : Dialect(getDialectNamespace(), context) {
addOperations<AffineApplyOp, AffineForOp, AffineIfOp, AffineTerminatorOp>();
}
}
StandardOpsDialect::StandardOpsDialect(MLIRContext *context)
- : Dialect(/*name=*/"std", context) {
+ : Dialect(getDialectNamespace(), context) {
addOperations<CondBranchOp, DmaStartOp, DmaWaitOp,
#define GET_OP_LIST
#include "mlir/StandardOps/Ops.cpp.inc"