|
MLIR
22.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... | |
| char * | mlirTranslateModuleToLLVMIRToString (MlirOperation module) |
| 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 46 of file LLVMIR.cpp.
| DEFINE_C_API_PTR_METHODS | ( | MlirTypeToLLVMIRTranslator | , |
| mlir::LLVM::TypeToLLVMIRTranslator | |||
| ) |
Definition at line 68 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().
Referenced by mlirTranslateModuleToLLVMIRToString().
| char* mlirTranslateModuleToLLVMIRToString | ( | MlirOperation | module | ) |
Definition at line 37 of file LLVMIR.cpp.
References mlirTranslateModuleToLLVMIR().
Referenced by populateDialectLLVMSubmodule().
| 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 56 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 61 of file LLVMIR.cpp.
| 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 78 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 83 of file LLVMIR.cpp.