MLIR
20.0.0git
|
#include "mlir/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/IR/Operation.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Target/LLVMIR/ModuleTranslation.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/IR/MatrixBuilder.h"
#include "llvm/IR/Operator.h"
#include "mlir/Dialect/LLVMIR/LLVMConversionEnumsToLLVM.inc"
#include "mlir/Dialect/LLVMIR/LLVMConversions.inc"
#include "mlir/Dialect/LLVMIR/LLVMIntrinsicConversions.inc"
Go to the source code of this file.
Functions | |
static llvm::FastMathFlags | getFastmathFlags (FastmathFlagsInterface &op) |
static SmallVector< unsigned > | extractPosition (ArrayRef< int64_t > indices) |
Convert the value of a DenseI64ArrayAttr to a vector of unsigned indices. More... | |
static std::string | diagStr (const llvm::Type *type) |
Convert an LLVM type to a string for printing in diagnostics. More... | |
static FailureOr< llvm::Function * > | getOverloadedDeclaration (CallIntrinsicOp op, llvm::Intrinsic::ID id, llvm::Module *module, LLVM::ModuleTranslation &moduleTranslation) |
Get the declaration of an overloaded llvm intrinsic. More... | |
static llvm::OperandBundleDef | convertOperandBundle (OperandRange bundleOperands, StringRef bundleTag, LLVM::ModuleTranslation &moduleTranslation) |
static SmallVector< llvm::OperandBundleDef > | convertOperandBundles (OperandRangeRange bundleOperands, ArrayAttr bundleTags, LLVM::ModuleTranslation &moduleTranslation) |
static SmallVector< llvm::OperandBundleDef > | convertOperandBundles (OperandRangeRange bundleOperands, std::optional< ArrayAttr > bundleTags, LLVM::ModuleTranslation &moduleTranslation) |
static LogicalResult | convertCallLLVMIntrinsicOp (CallIntrinsicOp op, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
Builder for LLVM_CallIntrinsicOp. More... | |
static void | convertLinkerOptionsOp (ArrayAttr options, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
static LogicalResult | convertOperationImpl (Operation &opInst, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
|
static |
Builder for LLVM_CallIntrinsicOp.
Definition at line 140 of file LLVMToLLVMIRTranslation.cpp.
References convertOperandBundles(), mlir::LLVM::ModuleTranslation::convertType(), diagStr(), mlir::emitError(), getFastmathFlags(), getOverloadedDeclaration(), mlir::LLVM::ModuleTranslation::lookupValues(), and mlir::LLVM::ModuleTranslation::mapValue().
|
static |
Definition at line 209 of file LLVMToLLVMIRTranslation.cpp.
References mlir::get(), mlir::LLVM::ModuleTranslation::getLLVMModule(), and options.
|
static |
Definition at line 107 of file LLVMToLLVMIRTranslation.cpp.
References mlir::LLVM::ModuleTranslation::lookupValue().
Referenced by convertOperandBundles().
|
static |
Definition at line 117 of file LLVMToLLVMIRTranslation.cpp.
References convertOperandBundle().
Referenced by convertCallLLVMIntrinsicOp(), convertOperandBundles(), and convertOperationImpl().
|
static |
Definition at line 130 of file LLVMToLLVMIRTranslation.cpp.
References convertOperandBundles().
|
static |
Definition at line 228 of file LLVMToLLVMIRTranslation.cpp.
References convertOperandBundles(), mlir::LLVM::ModuleTranslation::convertType(), mlir::detail::enumerate(), mlir::get(), mlir::Operation::getAttrOfType(), mlir::LLVM::ModuleTranslation::getContext(), getFastmathFlags(), mlir::LLVM::ModuleTranslation::getLLVMContext(), mlir::Operation::getNumResults(), mlir::Operation::getResult(), mlir::LLVM::ModuleTranslation::lookupBlock(), mlir::LLVM::ModuleTranslation::lookupFunction(), mlir::LLVM::ModuleTranslation::lookupGlobal(), mlir::LLVM::ModuleTranslation::lookupValue(), mlir::LLVM::ModuleTranslation::lookupValues(), mlir::LLVM::ModuleTranslation::mapBranch(), mlir::LLVM::ModuleTranslation::mapCall(), mlir::LLVM::ModuleTranslation::mapValue(), mlir::LLVM::ModuleTranslation::setAccessGroupsMetadata(), mlir::LLVM::ModuleTranslation::setAliasScopeMetadata(), mlir::LLVM::ModuleTranslation::setLoopMetadata(), mlir::LLVM::ModuleTranslation::setTBAAMetadata(), and mlir::LLVM::ModuleTranslation::symbolTable().
|
static |
Convert an LLVM type to a string for printing in diagnostics.
Definition at line 61 of file LLVMToLLVMIRTranslation.cpp.
Referenced by convertCallLLVMIntrinsicOp(), and getOverloadedDeclaration().
|
static |
Convert the value of a DenseI64ArrayAttr to a vector of unsigned indices.
Definition at line 54 of file LLVMToLLVMIRTranslation.cpp.
|
static |
Definition at line 31 of file LLVMToLLVMIRTranslation.cpp.
References contract().
Referenced by convertCallLLVMIntrinsicOp(), and convertOperationImpl().
|
static |
Get the declaration of an overloaded llvm intrinsic.
First we get the overloaded argument types and/or result type from the CallIntrinsicOp, and then use those to get the correct declaration of the overloaded intrinsic.
Definition at line 72 of file LLVMToLLVMIRTranslation.cpp.
References mlir::LLVM::ModuleTranslation::convertType(), diagStr(), mlir::emitError(), mlir::get(), and table.
Referenced by convertCallLLVMIntrinsicOp().