aboutsummaryrefslogtreecommitdiff
path: root/mlir/lib/Dialect/Transform/DebugExtension/DebugExtension.cpp
blob: d69535169f956dd6703a737722c41841db2d755b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//===- DebugExtension.cpp - Debug extension for the Transform dialect -----===//
//
// 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
//
//===----------------------------------------------------------------------===//

#include "mlir/Dialect/Transform/DebugExtension/DebugExtension.h"

#include "mlir/Dialect/Transform/DebugExtension/DebugExtensionOps.h"
#include "mlir/Dialect/Transform/IR/TransformDialect.h"
#include "mlir/IR/DialectRegistry.h"

using namespace mlir;

namespace {
/// Debug extension of the Transform dialect. This provides operations for
/// debugging transform dialect scripts.
class DebugExtension
    : public transform::TransformDialectExtension<DebugExtension> {
public:
  MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(DebugExtension)

  void init() {
    registerTransformOps<
#define GET_OP_LIST
#include "mlir/Dialect/Transform/DebugExtension/DebugExtensionOps.cpp.inc"
        >();
  }
};
} // namespace

void mlir::transform::registerDebugExtension(DialectRegistry &dialectRegistry) {
  dialectRegistry.addExtensions<DebugExtension>();
}