MLIR
21.0.0git
|
#include "mlir-c/Target/LLVMIR.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Type.h"
#include "mlir/CAPI/IR.h"
#include "mlir/CAPI/Wrap.h"
#include "mlir/Target/LLVMIR/ModuleTranslation.h"
#include "mlir/Target/LLVMIR/TypeFromLLVM.h"
Go to the source code of this file.
Functions | |
LLVMModuleRef | mlirTranslateModuleToLLVMIR (MlirOperation module, LLVMContextRef context) |
Translate operation that satisfies LLVM dialect module requirements into an LLVM IR module living in the given context. More... | |
DEFINE_C_API_PTR_METHODS (MlirTypeFromLLVMIRTranslator, mlir::LLVM::TypeFromLLVMIRTranslator) MlirTypeFromLLVMIRTranslator mlirTypeFromLLVMIRTranslatorCreate(MlirContext ctx) | |
void | mlirTypeFromLLVMIRTranslatorDestroy (MlirTypeFromLLVMIRTranslator translator) |
Takes an LLVM::TypeFromLLVMIRTranslator owned by the caller and destroys it. More... | |
MlirType | mlirTypeFromLLVMIRTranslatorTranslateType (MlirTypeFromLLVMIRTranslator translator, LLVMTypeRef llvmType) |
Translates the given LLVM IR type to the MLIR LLVM dialect. More... | |
DEFINE_C_API_PTR_METHODS (MlirTypeToLLVMIRTranslator, mlir::LLVM::TypeToLLVMIRTranslator) MlirTypeToLLVMIRTranslator mlirTypeToLLVMIRTranslatorCreate(LLVMContextRef ctx) | |
void | mlirTypeToLLVMIRTranslatorDestroy (MlirTypeToLLVMIRTranslator translator) |
Takes an LLVM::TypeToLLVMIRTranslator owned by the caller and destroys it. More... | |
LLVMTypeRef | mlirTypeToLLVMIRTranslatorTranslateType (MlirTypeToLLVMIRTranslator translator, MlirType mlirType) |
Translates the given MLIR LLVM dialect to the LLVM IR type. More... | |
DEFINE_C_API_PTR_METHODS | ( | MlirTypeFromLLVMIRTranslator | , |
mlir::LLVM::TypeFromLLVMIRTranslator | |||
) |
Definition at line 37 of file LLVMIR.cpp.
DEFINE_C_API_PTR_METHODS | ( | MlirTypeToLLVMIRTranslator | , |
mlir::LLVM::TypeToLLVMIRTranslator | |||
) |
Definition at line 59 of file LLVMIR.cpp.
LLVMModuleRef mlirTranslateModuleToLLVMIR | ( | MlirOperation | module, |
LLVMContextRef | context | ||
) |
Translate operation that satisfies LLVM dialect module requirements into an LLVM IR module living in the given context.
This translates operations from any dilalect that has a registered implementation of LLVMTranslationDialectInterface.
Definition at line 23 of file LLVMIR.cpp.
References mlir::translateModuleToLLVMIR(), unwrap(), and wrap().
void mlirTypeFromLLVMIRTranslatorDestroy | ( | MlirTypeFromLLVMIRTranslator | translator | ) |
Takes an LLVM::TypeFromLLVMIRTranslator owned by the caller and destroys it.
It is the responsibility of the user to only pass an LLVM::TypeFromLLVMIRTranslator class.
Definition at line 47 of file LLVMIR.cpp.
References unwrap().
MlirType mlirTypeFromLLVMIRTranslatorTranslateType | ( | MlirTypeFromLLVMIRTranslator | translator, |
LLVMTypeRef | llvmType | ||
) |
Translates the given LLVM IR type to the MLIR LLVM dialect.
Definition at line 52 of file LLVMIR.cpp.
References mlir::LLVM::TypeFromLLVMIRTranslator::translateType(), unwrap(), and wrap().
void mlirTypeToLLVMIRTranslatorDestroy | ( | MlirTypeToLLVMIRTranslator | translator | ) |
Takes an LLVM::TypeToLLVMIRTranslator owned by the caller and destroys it.
It is the responsibility of the user to only pass an LLVM::TypeToLLVMIRTranslator class.
Definition at line 69 of file LLVMIR.cpp.
References unwrap().
LLVMTypeRef mlirTypeToLLVMIRTranslatorTranslateType | ( | MlirTypeToLLVMIRTranslator | translator, |
MlirType | mlirType | ||
) |
Translates the given MLIR LLVM dialect to the LLVM IR type.
Definition at line 74 of file LLVMIR.cpp.
References mlir::LLVM::TypeToLLVMIRTranslator::translateType(), unwrap(), and wrap().