Files
clang-p2996/mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.h
Alex Zinenko 63c9d2b14e [mlir] Add transform.foreach_match
Add a new transform op combinator that implements an "if-then-else"
style of mechanism for applying transformations. Its main purpose is to
serve as a higher-level driver when applying multiple transform scripts
to potentially overlapping pieces of the payload IR. This is similar to
how the various rewrite drivers operate in C++, but at a higher level
and with more declarative expressions. This is not intended to replace
existing pattern-based rewrites, but to to drive more complex
transformations that are exposed in the transform dialect and are too
complex to be expressed as simple declarative rewrites.

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D148013
2023-04-12 11:01:38 +00:00

39 lines
1.3 KiB
C++

//===- TestTransformDialectExtension.h --------------------------*- C++ -*-===//
//
// 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
//
//===----------------------------------------------------------------------===//
//
// This file defines an extension of the MLIR Transform dialect for testing
// purposes.
//
//===----------------------------------------------------------------------===//
#ifndef MLIR_TESTTRANSFORMDIALECTEXTENSION_H
#define MLIR_TESTTRANSFORMDIALECTEXTENSION_H
#include "mlir/Dialect/PDL/IR/PDLTypes.h"
#include "mlir/Dialect/Transform/IR/MatchInterfaces.h"
#include "mlir/Dialect/Transform/IR/TransformInterfaces.h"
#include "mlir/Dialect/Transform/IR/TransformTypes.h"
#include "mlir/IR/OpImplementation.h"
namespace mlir {
class DialectRegistry;
} // namespace mlir
#define GET_TYPEDEF_CLASSES
#include "TestTransformDialectExtensionTypes.h.inc"
#define GET_OP_CLASSES
#include "TestTransformDialectExtension.h.inc"
namespace test {
/// Registers the test extension to the Transform dialect.
void registerTestTransformDialectExtension(::mlir::DialectRegistry &registry);
} // namespace test
#endif // MLIR_TESTTRANSFORMDIALECTEXTENSION_H