MLIR  20.0.0git
IRDLExtension.cpp
Go to the documentation of this file.
1 //===- IRDLExtension.cpp - IRDL extension for the Transform dialect -------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
14 
15 using namespace mlir;
16 
17 namespace {
18 class IRDLExtension
19  : public transform::TransformDialectExtension<IRDLExtension> {
20 public:
21  void init() {
22  registerTransformOps<
23 #define GET_OP_LIST
24 #include "mlir/Dialect/Transform/IRDLExtension/IRDLExtensionOps.cpp.inc"
25  >();
26 
27  declareDependentDialect<irdl::IRDLDialect>();
28  }
29 };
30 } // namespace
31 
33  dialectRegistry.addExtensions<IRDLExtension>();
34 }
The DialectRegistry maps a dialect namespace to a constructor for the matching dialect.
void addExtensions()
Add the given extensions to the registry.
Base class for extensions of the Transform dialect that supports injecting operations into the Transf...
void registerIRDLExtension(DialectRegistry &dialectRegistry)
Registers the IRDL extension of the Transform dialect in the given registry.
Include the generated interface declarations.