//===- ModuleImport.h - LLVM to MLIR conversion -----------------*- 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 implements the import of an LLVM IR module into an LLVM dialect // module. // //===----------------------------------------------------------------------===// #ifndef MLIR_TARGET_LLVMIR_MODULEIMPORT_H #define MLIR_TARGET_LLVMIR_MODULEIMPORT_H #include "mlir/Dialect/LLVMIR/LLVMDialect.h" #include "mlir/IR/BuiltinOps.h" #include "mlir/Target/LLVMIR/Import.h" #include "mlir/Target/LLVMIR/LLVMImportInterface.h" #include "mlir/Target/LLVMIR/TypeFromLLVM.h" namespace llvm { class BasicBlock; class CallBase; class DbgVariableIntrinsic; class Function; class Instruction; class Value; } // namespace llvm namespace mlir { namespace LLVM { namespace detail { class DataLayoutImporter; class DebugImporter; class LoopAnnotationImporter; } // namespace detail /// Module import implementation class that provides methods to import globals /// and functions from an LLVM module into an MLIR module. It holds mappings /// between the original and translated globals, basic blocks, and values used /// during the translation. Additionally, it keeps track of the current constant /// insertion point since LLVM immediate values translate to MLIR operations /// that are introduced at the beginning of the region. class ModuleImport { … }; } // namespace LLVM } // namespace mlir #endif // MLIR_TARGET_LLVMIR_MODULEIMPORT_H