MLIR 23.0.0git
Rewrite.h
Go to the documentation of this file.
1//===- Rewrite.h - C API Utils for Core MLIR classes ------------*- C++ -*-===//
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// This file contains declarations of implementation details of the C API for
10// rewrite patterns. This file should not be included from C++ code other than
11// C API implementation nor from C code.
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef MLIR_CAPI_REWRITE_H
16#define MLIR_CAPI_REWRITE_H
17
18#include "mlir-c/Rewrite.h"
19#include "mlir/CAPI/Wrap.h"
23
25DEFINE_C_API_PTR_METHODS(MlirRewritePattern, const mlir::RewritePattern)
27DEFINE_C_API_PTR_METHODS(MlirFrozenRewritePatternSet,
28 mlir::FrozenRewritePatternSet)
29DEFINE_C_API_PTR_METHODS(MlirPatternRewriter, mlir::PatternRewriter)
31DEFINE_C_API_PTR_METHODS(MlirConversionPattern, const mlir::ConversionPattern)
33DEFINE_C_API_PTR_METHODS(MlirConversionPatternRewriter,
34 mlir::ConversionPatternRewriter)
35DEFINE_C_API_PTR_METHODS(MlirConversionConfig, mlir::ConversionConfig)
36
37#if MLIR_ENABLE_PDL_IN_PATTERNMATCH
38DEFINE_C_API_PTR_METHODS(MlirPDLPatternModule, mlir::PDLPatternModule)
39DEFINE_C_API_PTR_METHODS(MlirPDLResultList, mlir::PDLResultList)
40DEFINE_C_API_PTR_METHODS(MlirPDLValue, const mlir::PDLValue)
41#endif // MLIR_ENABLE_PDL_IN_PATTERNMATCH
42
43#endif // MLIR_CAPI_REWRITE_H
#define DEFINE_C_API_PTR_METHODS(name, cpptype)
Definition Wrap.h:25
RewritePattern is the common base class for all DAG to DAG replacements.
This class coordinates the application of a rewrite on a set of IR, providing a way for clients to tr...
Include the generated interface declarations.