My Project
LLVMIR.h
Go to the documentation of this file.
1 //===- LLVMIR.h - MLIR to LLVM IR conversion --------------------*- C++ -*-===//
2 //
3 // Part of the MLIR 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 declares the entry point for the MLIR to LLVM IR conversion.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef MLIR_TARGET_LLVMIR_H
14 #define MLIR_TARGET_LLVMIR_H
15 
16 #include <memory>
17 
18 // Forward-declare LLVM classes.
19 namespace llvm {
20 class LLVMContext;
21 class Module;
22 } // namespace llvm
23 
24 namespace mlir {
25 
26 class OwningModuleRef;
27 class MLIRContext;
28 class ModuleOp;
29 
34 std::unique_ptr<llvm::Module> translateModuleToLLVMIR(ModuleOp m);
35 
40 OwningModuleRef
41 translateLLVMIRToModule(std::unique_ptr<llvm::Module> llvmModule,
42  MLIRContext *context);
43 
44 } // namespace mlir
45 
46 #endif // MLIR_TARGET_LLVMIR_H
Definition: InferTypeOpInterface.cpp:20
Definition: PassRegistry.cpp:413
OwningModuleRef translateLLVMIRToModule(llvm::SourceMgr &sourceMgr, MLIRContext *context)
Definition: ConvertFromLLVMIR.cpp:603
std::unique_ptr< llvm::Module > translateModuleToLLVMIR(ModuleOp m)
Definition: ConvertToLLVMIR.cpp:24