1//===- MLIRGen.h - MLIR PDLL Code Generation --------------------*- 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#ifndef MLIR_TOOLS_PDLL_CODEGEN_MLIRGEN_H_
10#define MLIR_TOOLS_PDLL_CODEGEN_MLIRGEN_H_
11
12#include <memory>
13
14#include "mlir/Support/LogicalResult.h"
15
16namespace llvm {
17class SourceMgr;
18} // namespace llvm
19
20namespace mlir {
21class MLIRContext;
22class ModuleOp;
23template <typename OpT>
24class OwningOpRef;
25
26namespace pdll {
27namespace ast {
28class Context;
29class Module;
30} // namespace ast
31
32/// Given a PDLL module, generate an MLIR PDL pattern module within the given
33/// MLIR context.
34OwningOpRef<ModuleOp> codegenPDLLToMLIR(MLIRContext *mlirContext,
35 const ast::Context &context,
36 const llvm::SourceMgr &sourceMgr,
37 const ast::Module &module);
38} // namespace pdll
39} // namespace mlir
40
41#endif // MLIR_TOOLS_PDLL_CODEGEN_MLIRGEN_H_
42

source code of mlir/include/mlir/Tools/PDLL/CodeGen/MLIRGen.h