MLIR  18.0.0git
Export.h
Go to the documentation of this file.
1 //===- Export.h - MLIR to LLVM IR translation entry point -------*- 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_TARGET_LLVMIR_EXPORT_H
10 #define MLIR_TARGET_LLVMIR_EXPORT_H
11 
12 #include "llvm/ADT/StringRef.h"
13 #include <memory>
14 
15 namespace llvm {
16 class LLVMContext;
17 class Module;
18 } // namespace llvm
19 
20 namespace mlir {
21 class Operation;
22 
23 /// Translate operation that satisfies LLVM dialect module requirements into an
24 /// LLVM IR module living in the given context. This translates operations from
25 /// any dilalect that has a registered implementation of
26 /// LLVMTranslationDialectInterface.
27 std::unique_ptr<llvm::Module>
28 translateModuleToLLVMIR(Operation *module, llvm::LLVMContext &llvmContext,
29  llvm::StringRef name = "LLVMDialectModule");
30 } // namespace mlir
31 
32 #endif // MLIR_TARGET_LLVMIR_EXPORT_H
Operation is the basic unit of execution within MLIR.
Definition: Operation.h:88
Include the generated interface declarations.
Definition: CallGraph.h:229
Include the generated interface declarations.
std::unique_ptr< llvm::Module > translateModuleToLLVMIR(Operation *module, llvm::LLVMContext &llvmContext, llvm::StringRef name="LLVMDialectModule")
Translate operation that satisfies LLVM dialect module requirements into an LLVM IR module living in ...