MLIR
22.0.0git
|
#include "mlir/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/IR/Operation.h"
#include "mlir/Interfaces/CallInterfaces.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Target/LLVMIR/ModuleTranslation.h"
#include "llvm/ADT/TypeSwitch.h"
#include "llvm/IR/DIBuilder.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/IR/MatrixBuilder.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 llvm::Metadata * | convertModuleFlagValue (StringRef key, ArrayAttr arrayAttr, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
static llvm::Metadata * | convertModuleFlagProfileSummaryAttr (StringRef key, ModuleFlagProfileSummaryAttr summaryAttr, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
static void | convertModuleFlagsOp (ArrayAttr flags, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
static llvm::DILocalScope * | getLocalScopeFromLoc (llvm::IRBuilderBase &builder, Location loc, LLVM::ModuleTranslation &moduleTranslation) |
static LogicalResult | convertOperationImpl (Operation &opInst, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) |
|
static |
Builder for LLVM_CallIntrinsicOp.
Definition at line 143 of file LLVMToLLVMIRTranslation.cpp.
References convertOperandBundles(), diagStr(), mlir::emitError(), mlir::remark::failed(), getFastmathFlags(), and getOverloadedDeclaration().
|
static |
Definition at line 216 of file LLVMToLLVMIRTranslation.cpp.
References mlir::get(), and options.
|
static |
Definition at line 266 of file LLVMToLLVMIRTranslation.cpp.
References mlir::get().
Referenced by convertModuleFlagsOp().
|
static |
Definition at line 328 of file LLVMToLLVMIRTranslation.cpp.
References convertModuleFlagProfileSummaryAttr(), convertModuleFlagValue(), and mlir::get().
|
static |
Definition at line 235 of file LLVMToLLVMIRTranslation.cpp.
References mlir::get().
Referenced by convertModuleFlagsOp().
|
static |
Definition at line 110 of file LLVMToLLVMIRTranslation.cpp.
Referenced by convertOperandBundles().
|
static |
Definition at line 120 of file LLVMToLLVMIRTranslation.cpp.
References convertOperandBundle().
Referenced by convertCallLLVMIntrinsicOp(), convertOperandBundles(), and convertOperationImpl().
|
static |
Definition at line 133 of file LLVMToLLVMIRTranslation.cpp.
References convertOperandBundles().
|
static |
Definition at line 374 of file LLVMToLLVMIRTranslation.cpp.
References mlir::linalg::concat(), convertOperandBundles(), mlir::detail::enumerate(), mlir::remark::failed(), mlir::get(), mlir::FlatSymbolRefAttr::get(), mlir::Operation::getAttrOfType(), getFastmathFlags(), mlir::Operation::getNumResults(), mlir::Operation::getResult(), and mlir::LLVM::parentLLVMModule().
|
static |
Convert an LLVM type to a string for printing in diagnostics.
Definition at line 64 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 57 of file LLVMToLLVMIRTranslation.cpp.
|
static |
Definition at line 34 of file LLVMToLLVMIRTranslation.cpp.
References contract().
Referenced by convertCallLLVMIntrinsicOp(), and convertOperationImpl().
|
static |
Definition at line 363 of file LLVMToLLVMIRTranslation.cpp.
References mlir::LocationAttr::findInstanceOf().
|
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 75 of file LLVMToLLVMIRTranslation.cpp.
References diagStr(), mlir::emitError(), mlir::get(), and table.
Referenced by convertCallLLVMIntrinsicOp().