MLIR
21.0.0git
|
#include "mlir-c/IR.h"
#include "mlir-c/Support.h"
#include "llvm-c/Core.h"
#include "llvm-c/Support.h"
Go to the source code of this file.
Classes | |
struct | MlirTypeFromLLVMIRTranslator |
struct | MlirTypeToLLVMIRTranslator |
Typedefs | |
typedef struct MlirTypeFromLLVMIRTranslator | MlirTypeFromLLVMIRTranslator |
typedef struct MlirTypeToLLVMIRTranslator | MlirTypeToLLVMIRTranslator |
Functions | |
MLIR_CAPI_EXPORTED 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... | |
MLIR_CAPI_EXPORTED MlirTypeFromLLVMIRTranslator | mlirTypeFromLLVMIRTranslatorCreate (MlirContext ctx) |
Create an LLVM::TypeFromLLVMIRTranslator and transfer ownership to the caller. More... | |
MLIR_CAPI_EXPORTED void | mlirTypeFromLLVMIRTranslatorDestroy (MlirTypeFromLLVMIRTranslator translator) |
Takes an LLVM::TypeFromLLVMIRTranslator owned by the caller and destroys it. More... | |
MLIR_CAPI_EXPORTED MlirType | mlirTypeFromLLVMIRTranslatorTranslateType (MlirTypeFromLLVMIRTranslator translator, LLVMTypeRef llvmType) |
Translates the given LLVM IR type to the MLIR LLVM dialect. More... | |
MLIR_CAPI_EXPORTED MlirTypeToLLVMIRTranslator | mlirTypeToLLVMIRTranslatorCreate (LLVMContextRef ctx) |
Create an LLVM::TypeToLLVMIRTranslator and transfer ownership to the caller. More... | |
MLIR_CAPI_EXPORTED void | mlirTypeToLLVMIRTranslatorDestroy (MlirTypeToLLVMIRTranslator translator) |
Takes an LLVM::TypeToLLVMIRTranslator owned by the caller and destroys it. More... | |
MLIR_CAPI_EXPORTED LLVMTypeRef | mlirTypeToLLVMIRTranslatorTranslateType (MlirTypeToLLVMIRTranslator translator, MlirType mlirType) |
Translates the given MLIR LLVM dialect to the LLVM IR type. More... | |
typedef struct MlirTypeFromLLVMIRTranslator MlirTypeFromLLVMIRTranslator |
typedef struct MlirTypeToLLVMIRTranslator MlirTypeToLLVMIRTranslator |
MLIR_CAPI_EXPORTED 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().
MLIR_CAPI_EXPORTED MlirTypeFromLLVMIRTranslator mlirTypeFromLLVMIRTranslatorCreate | ( | MlirContext | ctx | ) |
Create an LLVM::TypeFromLLVMIRTranslator and transfer ownership to the caller.
MLIR_CAPI_EXPORTED 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().
MLIR_CAPI_EXPORTED 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().
MLIR_CAPI_EXPORTED MlirTypeToLLVMIRTranslator mlirTypeToLLVMIRTranslatorCreate | ( | LLVMContextRef | ctx | ) |
Create an LLVM::TypeToLLVMIRTranslator and transfer ownership to the caller.
MLIR_CAPI_EXPORTED 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().
MLIR_CAPI_EXPORTED 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().