1//===- DebugExtension.cpp - Debug 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
9#include "mlir/Dialect/Transform/DebugExtension/DebugExtension.h"
10
11#include "mlir/Dialect/Transform/DebugExtension/DebugExtensionOps.h"
12#include "mlir/Dialect/Transform/IR/TransformDialect.h"
13#include "mlir/IR/DialectRegistry.h"
14
15using namespace mlir;
16
17namespace {
18/// Debug extension of the Transform dialect. This provides operations for
19/// debugging transform dialect scripts.
20class DebugExtension
21 : public transform::TransformDialectExtension<DebugExtension> {
22public:
23 void init() {
24 registerTransformOps<
25#define GET_OP_LIST
26#include "mlir/Dialect/Transform/DebugExtension/DebugExtensionOps.cpp.inc"
27 >();
28 }
29};
30} // namespace
31
32void mlir::transform::registerDebugExtension(DialectRegistry &dialectRegistry) {
33 dialectRegistry.addExtensions<DebugExtension>();
34}
35

source code of mlir/lib/Dialect/Transform/DebugExtension/DebugExtension.cpp