2020-03-15 11:33:53 +08:00
|
|
|
//===- DialectGen.cpp - MLIR dialect definitions generator ----------------===//
|
|
|
|
//
|
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// DialectGen uses the description of dialects to generate C++ definitions.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2020-09-26 10:18:54 +08:00
|
|
|
#include "mlir/TableGen/CodeGenHelpers.h"
|
2020-03-15 11:33:53 +08:00
|
|
|
#include "mlir/TableGen/Format.h"
|
|
|
|
#include "mlir/TableGen/GenInfo.h"
|
2020-07-01 06:42:52 +08:00
|
|
|
#include "mlir/TableGen/Interfaces.h"
|
2020-03-15 11:33:53 +08:00
|
|
|
#include "mlir/TableGen/OpClass.h"
|
|
|
|
#include "mlir/TableGen/OpTrait.h"
|
|
|
|
#include "mlir/TableGen/Operator.h"
|
|
|
|
#include "llvm/ADT/Sequence.h"
|
|
|
|
#include "llvm/ADT/StringExtras.h"
|
|
|
|
#include "llvm/Support/CommandLine.h"
|
|
|
|
#include "llvm/Support/Signals.h"
|
|
|
|
#include "llvm/TableGen/Error.h"
|
|
|
|
#include "llvm/TableGen/Record.h"
|
|
|
|
#include "llvm/TableGen/TableGenBackend.h"
|
|
|
|
|
|
|
|
#define DEBUG_TYPE "mlir-tblgen-opdefgen"
|
|
|
|
|
|
|
|
using namespace mlir;
|
|
|
|
using namespace mlir::tblgen;
|
|
|
|
|
|
|
|
static llvm::cl::OptionCategory dialectGenCat("Options for -gen-dialect-*");
|
|
|
|
static llvm::cl::opt<std::string>
|
|
|
|
selectedDialect("dialect", llvm::cl::desc("The dialect to gen for"),
|
|
|
|
llvm::cl::cat(dialectGenCat), llvm::cl::CommaSeparated);
|
|
|
|
|
2020-03-17 04:55:16 +08:00
|
|
|
/// Utility iterator used for filtering records for a specific dialect.
|
|
|
|
namespace {
|
|
|
|
using DialectFilterIterator =
|
|
|
|
llvm::filter_iterator<ArrayRef<llvm::Record *>::iterator,
|
|
|
|
std::function<bool(const llvm::Record *)>>;
|
|
|
|
} // end anonymous namespace
|
|
|
|
|
2020-03-15 11:33:53 +08:00
|
|
|
/// Given a set of records for a T, filter the ones that correspond to
|
|
|
|
/// the given dialect.
|
|
|
|
template <typename T>
|
2020-03-17 04:55:16 +08:00
|
|
|
static iterator_range<DialectFilterIterator>
|
|
|
|
filterForDialect(ArrayRef<llvm::Record *> records, Dialect &dialect) {
|
|
|
|
auto filterFn = [&](const llvm::Record *record) {
|
2020-03-15 11:33:53 +08:00
|
|
|
return T(record).getDialect() == dialect;
|
2020-03-17 04:55:16 +08:00
|
|
|
};
|
|
|
|
return {DialectFilterIterator(records.begin(), records.end(), filterFn),
|
|
|
|
DialectFilterIterator(records.end(), records.end(), filterFn)};
|
2020-03-15 11:33:53 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// GEN: Dialect declarations
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
/// The code block for the start of a dialect class declaration.
|
|
|
|
///
|
|
|
|
/// {0}: The name of the dialect class.
|
|
|
|
/// {1}: The dialect namespace.
|
Separate the Registration from Loading dialects in the Context
This changes the behavior of constructing MLIRContext to no longer load globally
registered dialects on construction. Instead Dialects are only loaded explicitly
on demand:
- the Parser is lazily loading Dialects in the context as it encounters them
during parsing. This is the only purpose for registering dialects and not load
them in the context.
- Passes are expected to declare the dialects they will create entity from
(Operations, Attributes, or Types), and the PassManager is loading Dialects into
the Context when starting a pipeline.
This changes simplifies the configuration of the registration: a compiler only
need to load the dialect for the IR it will emit, and the optimizer is
self-contained and load the required Dialects. For example in the Toy tutorial,
the compiler only needs to load the Toy dialect in the Context, all the others
(linalg, affine, std, LLVM, ...) are automatically loaded depending on the
optimization pipeline enabled.
To adjust to this change, stop using the existing dialect registration: the
global registry will be removed soon.
1) For passes, you need to override the method:
virtual void getDependentDialects(DialectRegistry ®istry) const {}
and registery on the provided registry any dialect that this pass can produce.
Passes defined in TableGen can provide this list in the dependentDialects list
field.
2) For dialects, on construction you can register dependent dialects using the
provided MLIRContext: `context.getOrLoadDialect<DialectName>()`
This is useful if a dialect may canonicalize or have interfaces involving
another dialect.
3) For loading IR, dialect that can be in the input file must be explicitly
registered with the context. `MlirOptMain()` is taking an explicit registry for
this purpose. See how the standalone-opt.cpp example is setup:
mlir::DialectRegistry registry;
registry.insert<mlir::standalone::StandaloneDialect>();
registry.insert<mlir::StandardOpsDialect>();
Only operations from these two dialects can be in the input file. To include all
of the dialects in MLIR Core, you can populate the registry this way:
mlir::registerAllDialects(registry);
4) For `mlir-translate` callback, as well as frontend, Dialects can be loaded in
the context before emitting the IR: context.getOrLoadDialect<ToyDialect>()
Differential Revision: https://reviews.llvm.org/D85622
2020-08-19 04:01:19 +08:00
|
|
|
/// {2}: initialization code that is emitted in the ctor body before calling
|
|
|
|
/// initialize()
|
2020-03-15 11:33:53 +08:00
|
|
|
static const char *const dialectDeclBeginStr = R"(
|
|
|
|
class {0} : public ::mlir::Dialect {
|
2020-08-07 10:41:44 +08:00
|
|
|
explicit {0}(::mlir::MLIRContext *context)
|
|
|
|
: ::mlir::Dialect(getDialectNamespace(), context,
|
|
|
|
::mlir::TypeID::get<{0}>()) {{
|
Separate the Registration from Loading dialects in the Context
This changes the behavior of constructing MLIRContext to no longer load globally
registered dialects on construction. Instead Dialects are only loaded explicitly
on demand:
- the Parser is lazily loading Dialects in the context as it encounters them
during parsing. This is the only purpose for registering dialects and not load
them in the context.
- Passes are expected to declare the dialects they will create entity from
(Operations, Attributes, or Types), and the PassManager is loading Dialects into
the Context when starting a pipeline.
This changes simplifies the configuration of the registration: a compiler only
need to load the dialect for the IR it will emit, and the optimizer is
self-contained and load the required Dialects. For example in the Toy tutorial,
the compiler only needs to load the Toy dialect in the Context, all the others
(linalg, affine, std, LLVM, ...) are automatically loaded depending on the
optimization pipeline enabled.
To adjust to this change, stop using the existing dialect registration: the
global registry will be removed soon.
1) For passes, you need to override the method:
virtual void getDependentDialects(DialectRegistry ®istry) const {}
and registery on the provided registry any dialect that this pass can produce.
Passes defined in TableGen can provide this list in the dependentDialects list
field.
2) For dialects, on construction you can register dependent dialects using the
provided MLIRContext: `context.getOrLoadDialect<DialectName>()`
This is useful if a dialect may canonicalize or have interfaces involving
another dialect.
3) For loading IR, dialect that can be in the input file must be explicitly
registered with the context. `MlirOptMain()` is taking an explicit registry for
this purpose. See how the standalone-opt.cpp example is setup:
mlir::DialectRegistry registry;
registry.insert<mlir::standalone::StandaloneDialect>();
registry.insert<mlir::StandardOpsDialect>();
Only operations from these two dialects can be in the input file. To include all
of the dialects in MLIR Core, you can populate the registry this way:
mlir::registerAllDialects(registry);
4) For `mlir-translate` callback, as well as frontend, Dialects can be loaded in
the context before emitting the IR: context.getOrLoadDialect<ToyDialect>()
Differential Revision: https://reviews.llvm.org/D85622
2020-08-19 04:01:19 +08:00
|
|
|
{2}
|
2020-08-07 10:41:44 +08:00
|
|
|
initialize();
|
|
|
|
}
|
|
|
|
void initialize();
|
|
|
|
friend class ::mlir::MLIRContext;
|
2020-03-15 11:33:53 +08:00
|
|
|
public:
|
2021-02-05 01:12:15 +08:00
|
|
|
static constexpr ::llvm::StringLiteral getDialectNamespace() {
|
|
|
|
return ::llvm::StringLiteral("{1}");
|
|
|
|
}
|
2020-03-15 11:33:53 +08:00
|
|
|
)";
|
|
|
|
|
Separate the Registration from Loading dialects in the Context
This changes the behavior of constructing MLIRContext to no longer load globally
registered dialects on construction. Instead Dialects are only loaded explicitly
on demand:
- the Parser is lazily loading Dialects in the context as it encounters them
during parsing. This is the only purpose for registering dialects and not load
them in the context.
- Passes are expected to declare the dialects they will create entity from
(Operations, Attributes, or Types), and the PassManager is loading Dialects into
the Context when starting a pipeline.
This changes simplifies the configuration of the registration: a compiler only
need to load the dialect for the IR it will emit, and the optimizer is
self-contained and load the required Dialects. For example in the Toy tutorial,
the compiler only needs to load the Toy dialect in the Context, all the others
(linalg, affine, std, LLVM, ...) are automatically loaded depending on the
optimization pipeline enabled.
To adjust to this change, stop using the existing dialect registration: the
global registry will be removed soon.
1) For passes, you need to override the method:
virtual void getDependentDialects(DialectRegistry ®istry) const {}
and registery on the provided registry any dialect that this pass can produce.
Passes defined in TableGen can provide this list in the dependentDialects list
field.
2) For dialects, on construction you can register dependent dialects using the
provided MLIRContext: `context.getOrLoadDialect<DialectName>()`
This is useful if a dialect may canonicalize or have interfaces involving
another dialect.
3) For loading IR, dialect that can be in the input file must be explicitly
registered with the context. `MlirOptMain()` is taking an explicit registry for
this purpose. See how the standalone-opt.cpp example is setup:
mlir::DialectRegistry registry;
registry.insert<mlir::standalone::StandaloneDialect>();
registry.insert<mlir::StandardOpsDialect>();
Only operations from these two dialects can be in the input file. To include all
of the dialects in MLIR Core, you can populate the registry this way:
mlir::registerAllDialects(registry);
4) For `mlir-translate` callback, as well as frontend, Dialects can be loaded in
the context before emitting the IR: context.getOrLoadDialect<ToyDialect>()
Differential Revision: https://reviews.llvm.org/D85622
2020-08-19 04:01:19 +08:00
|
|
|
/// Registration for a single dependent dialect: to be inserted in the ctor
|
|
|
|
/// above for each dependent dialect.
|
|
|
|
const char *const dialectRegistrationTemplate = R"(
|
|
|
|
getContext()->getOrLoadDialect<{0}>();
|
|
|
|
)";
|
|
|
|
|
2020-03-15 11:33:53 +08:00
|
|
|
/// The code block for the attribute parser/printer hooks.
|
|
|
|
static const char *const attrParserDecl = R"(
|
|
|
|
/// Parse an attribute registered to this dialect.
|
|
|
|
::mlir::Attribute parseAttribute(::mlir::DialectAsmParser &parser,
|
|
|
|
::mlir::Type type) const override;
|
|
|
|
|
|
|
|
/// Print an attribute registered to this dialect.
|
|
|
|
void printAttribute(::mlir::Attribute attr,
|
|
|
|
::mlir::DialectAsmPrinter &os) const override;
|
|
|
|
)";
|
|
|
|
|
|
|
|
/// The code block for the type parser/printer hooks.
|
|
|
|
static const char *const typeParserDecl = R"(
|
|
|
|
/// Parse a type registered to this dialect.
|
|
|
|
::mlir::Type parseType(::mlir::DialectAsmParser &parser) const override;
|
|
|
|
|
|
|
|
/// Print a type registered to this dialect.
|
|
|
|
void printType(::mlir::Type type,
|
|
|
|
::mlir::DialectAsmPrinter &os) const override;
|
|
|
|
)";
|
|
|
|
|
|
|
|
/// The code block for the constant materializer hook.
|
|
|
|
static const char *const constantMaterializerDecl = R"(
|
|
|
|
/// Materialize a single constant operation from a given attribute value with
|
|
|
|
/// the desired resultant type.
|
|
|
|
::mlir::Operation *materializeConstant(::mlir::OpBuilder &builder,
|
|
|
|
::mlir::Attribute value,
|
|
|
|
::mlir::Type type,
|
|
|
|
::mlir::Location loc) override;
|
|
|
|
)";
|
|
|
|
|
2020-03-17 09:31:58 +08:00
|
|
|
/// The code block for the operation attribute verifier hook.
|
|
|
|
static const char *const opAttrVerifierDecl = R"(
|
|
|
|
/// Provides a hook for verifying dialect attributes attached to the given
|
|
|
|
/// op.
|
|
|
|
::mlir::LogicalResult verifyOperationAttribute(
|
|
|
|
::mlir::Operation *op, ::mlir::NamedAttribute attribute) override;
|
|
|
|
)";
|
|
|
|
|
|
|
|
/// The code block for the region argument attribute verifier hook.
|
|
|
|
static const char *const regionArgAttrVerifierDecl = R"(
|
|
|
|
/// Provides a hook for verifying dialect attributes attached to the given
|
|
|
|
/// op's region argument.
|
|
|
|
::mlir::LogicalResult verifyRegionArgAttribute(
|
|
|
|
::mlir::Operation *op, unsigned regionIndex, unsigned argIndex,
|
|
|
|
::mlir::NamedAttribute attribute) override;
|
|
|
|
)";
|
|
|
|
|
|
|
|
/// The code block for the region result attribute verifier hook.
|
|
|
|
static const char *const regionResultAttrVerifierDecl = R"(
|
|
|
|
/// Provides a hook for verifying dialect attributes attached to the given
|
|
|
|
/// op's region result.
|
|
|
|
::mlir::LogicalResult verifyRegionResultAttribute(
|
|
|
|
::mlir::Operation *op, unsigned regionIndex, unsigned resultIndex,
|
|
|
|
::mlir::NamedAttribute attribute) override;
|
|
|
|
)";
|
|
|
|
|
2021-03-24 16:25:25 +08:00
|
|
|
/// The code block for the op interface fallback hook.
|
|
|
|
static const char *const operationInterfaceFallbackDecl = R"(
|
|
|
|
/// Provides a hook for op interface.
|
|
|
|
void *getRegisteredInterfaceForOp(mlir::TypeID interfaceID,
|
|
|
|
mlir::OperationName opName) override;
|
|
|
|
)";
|
|
|
|
|
2020-03-15 11:33:53 +08:00
|
|
|
/// Generate the declaration for the given dialect class.
|
2020-03-17 04:55:16 +08:00
|
|
|
static void emitDialectDecl(Dialect &dialect,
|
|
|
|
iterator_range<DialectFilterIterator> dialectAttrs,
|
|
|
|
iterator_range<DialectFilterIterator> dialectTypes,
|
|
|
|
raw_ostream &os) {
|
Separate the Registration from Loading dialects in the Context
This changes the behavior of constructing MLIRContext to no longer load globally
registered dialects on construction. Instead Dialects are only loaded explicitly
on demand:
- the Parser is lazily loading Dialects in the context as it encounters them
during parsing. This is the only purpose for registering dialects and not load
them in the context.
- Passes are expected to declare the dialects they will create entity from
(Operations, Attributes, or Types), and the PassManager is loading Dialects into
the Context when starting a pipeline.
This changes simplifies the configuration of the registration: a compiler only
need to load the dialect for the IR it will emit, and the optimizer is
self-contained and load the required Dialects. For example in the Toy tutorial,
the compiler only needs to load the Toy dialect in the Context, all the others
(linalg, affine, std, LLVM, ...) are automatically loaded depending on the
optimization pipeline enabled.
To adjust to this change, stop using the existing dialect registration: the
global registry will be removed soon.
1) For passes, you need to override the method:
virtual void getDependentDialects(DialectRegistry ®istry) const {}
and registery on the provided registry any dialect that this pass can produce.
Passes defined in TableGen can provide this list in the dependentDialects list
field.
2) For dialects, on construction you can register dependent dialects using the
provided MLIRContext: `context.getOrLoadDialect<DialectName>()`
This is useful if a dialect may canonicalize or have interfaces involving
another dialect.
3) For loading IR, dialect that can be in the input file must be explicitly
registered with the context. `MlirOptMain()` is taking an explicit registry for
this purpose. See how the standalone-opt.cpp example is setup:
mlir::DialectRegistry registry;
registry.insert<mlir::standalone::StandaloneDialect>();
registry.insert<mlir::StandardOpsDialect>();
Only operations from these two dialects can be in the input file. To include all
of the dialects in MLIR Core, you can populate the registry this way:
mlir::registerAllDialects(registry);
4) For `mlir-translate` callback, as well as frontend, Dialects can be loaded in
the context before emitting the IR: context.getOrLoadDialect<ToyDialect>()
Differential Revision: https://reviews.llvm.org/D85622
2020-08-19 04:01:19 +08:00
|
|
|
/// Build the list of dependent dialects
|
|
|
|
std::string dependentDialectRegistrations;
|
|
|
|
{
|
|
|
|
llvm::raw_string_ostream dialectsOs(dependentDialectRegistrations);
|
|
|
|
for (StringRef dependentDialect : dialect.getDependentDialects())
|
|
|
|
dialectsOs << llvm::formatv(dialectRegistrationTemplate,
|
|
|
|
dependentDialect);
|
|
|
|
}
|
2020-09-15 04:01:07 +08:00
|
|
|
|
|
|
|
// Emit all nested namespaces.
|
2020-09-26 10:18:54 +08:00
|
|
|
NamespaceEmitter nsEmitter(os, dialect);
|
2020-09-15 04:01:07 +08:00
|
|
|
|
2020-03-15 11:33:53 +08:00
|
|
|
// Emit the start of the decl.
|
|
|
|
std::string cppName = dialect.getCppClassName();
|
Separate the Registration from Loading dialects in the Context
This changes the behavior of constructing MLIRContext to no longer load globally
registered dialects on construction. Instead Dialects are only loaded explicitly
on demand:
- the Parser is lazily loading Dialects in the context as it encounters them
during parsing. This is the only purpose for registering dialects and not load
them in the context.
- Passes are expected to declare the dialects they will create entity from
(Operations, Attributes, or Types), and the PassManager is loading Dialects into
the Context when starting a pipeline.
This changes simplifies the configuration of the registration: a compiler only
need to load the dialect for the IR it will emit, and the optimizer is
self-contained and load the required Dialects. For example in the Toy tutorial,
the compiler only needs to load the Toy dialect in the Context, all the others
(linalg, affine, std, LLVM, ...) are automatically loaded depending on the
optimization pipeline enabled.
To adjust to this change, stop using the existing dialect registration: the
global registry will be removed soon.
1) For passes, you need to override the method:
virtual void getDependentDialects(DialectRegistry ®istry) const {}
and registery on the provided registry any dialect that this pass can produce.
Passes defined in TableGen can provide this list in the dependentDialects list
field.
2) For dialects, on construction you can register dependent dialects using the
provided MLIRContext: `context.getOrLoadDialect<DialectName>()`
This is useful if a dialect may canonicalize or have interfaces involving
another dialect.
3) For loading IR, dialect that can be in the input file must be explicitly
registered with the context. `MlirOptMain()` is taking an explicit registry for
this purpose. See how the standalone-opt.cpp example is setup:
mlir::DialectRegistry registry;
registry.insert<mlir::standalone::StandaloneDialect>();
registry.insert<mlir::StandardOpsDialect>();
Only operations from these two dialects can be in the input file. To include all
of the dialects in MLIR Core, you can populate the registry this way:
mlir::registerAllDialects(registry);
4) For `mlir-translate` callback, as well as frontend, Dialects can be loaded in
the context before emitting the IR: context.getOrLoadDialect<ToyDialect>()
Differential Revision: https://reviews.llvm.org/D85622
2020-08-19 04:01:19 +08:00
|
|
|
os << llvm::formatv(dialectDeclBeginStr, cppName, dialect.getName(),
|
|
|
|
dependentDialectRegistrations);
|
2020-03-15 11:33:53 +08:00
|
|
|
|
|
|
|
// Check for any attributes/types registered to this dialect. If there are,
|
|
|
|
// add the hooks for parsing/printing.
|
|
|
|
if (!dialectAttrs.empty())
|
|
|
|
os << attrParserDecl;
|
|
|
|
if (!dialectTypes.empty())
|
|
|
|
os << typeParserDecl;
|
|
|
|
|
|
|
|
// Add the decls for the various features of the dialect.
|
|
|
|
if (dialect.hasConstantMaterializer())
|
|
|
|
os << constantMaterializerDecl;
|
2020-03-17 09:31:58 +08:00
|
|
|
if (dialect.hasOperationAttrVerify())
|
|
|
|
os << opAttrVerifierDecl;
|
|
|
|
if (dialect.hasRegionArgAttrVerify())
|
|
|
|
os << regionArgAttrVerifierDecl;
|
|
|
|
if (dialect.hasRegionResultAttrVerify())
|
|
|
|
os << regionResultAttrVerifierDecl;
|
2021-03-24 16:25:25 +08:00
|
|
|
if (dialect.hasOperationInterfaceFallback())
|
|
|
|
os << operationInterfaceFallbackDecl;
|
2020-03-15 11:33:53 +08:00
|
|
|
if (llvm::Optional<StringRef> extraDecl = dialect.getExtraClassDeclaration())
|
|
|
|
os << *extraDecl;
|
|
|
|
|
|
|
|
// End the dialect decl.
|
|
|
|
os << "};\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool emitDialectDecls(const llvm::RecordKeeper &recordKeeper,
|
|
|
|
raw_ostream &os) {
|
|
|
|
emitSourceFileHeader("Dialect Declarations", os);
|
|
|
|
|
|
|
|
auto defs = recordKeeper.getAllDerivedDefinitions("Dialect");
|
|
|
|
if (defs.empty())
|
|
|
|
return false;
|
|
|
|
|
|
|
|
// Select the dialect to gen for.
|
|
|
|
const llvm::Record *dialectDef = nullptr;
|
|
|
|
if (defs.size() == 1 && selectedDialect.getNumOccurrences() == 0) {
|
|
|
|
dialectDef = defs.front();
|
|
|
|
} else if (selectedDialect.getNumOccurrences() == 0) {
|
|
|
|
llvm::errs() << "when more than 1 dialect is present, one must be selected "
|
|
|
|
"via '-dialect'";
|
|
|
|
return true;
|
|
|
|
} else {
|
|
|
|
auto dialectIt = llvm::find_if(defs, [](const llvm::Record *def) {
|
|
|
|
return Dialect(def).getName() == selectedDialect;
|
|
|
|
});
|
|
|
|
if (dialectIt == defs.end()) {
|
|
|
|
llvm::errs() << "selected dialect with '-dialect' does not exist";
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
dialectDef = *dialectIt;
|
|
|
|
}
|
|
|
|
|
|
|
|
auto attrDefs = recordKeeper.getAllDerivedDefinitions("DialectAttr");
|
|
|
|
auto typeDefs = recordKeeper.getAllDerivedDefinitions("DialectType");
|
|
|
|
Dialect dialect(dialectDef);
|
|
|
|
emitDialectDecl(dialect, filterForDialect<Attribute>(attrDefs, dialect),
|
|
|
|
filterForDialect<Type>(typeDefs, dialect), os);
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// GEN: Dialect registration hooks
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
static mlir::GenRegistration
|
|
|
|
genDialectDecls("gen-dialect-decls", "Generate dialect declarations",
|
|
|
|
[](const llvm::RecordKeeper &records, raw_ostream &os) {
|
|
|
|
return emitDialectDecls(records, os);
|
|
|
|
});
|