MLIR  19.0.0git
Functions
LLVMToLLVMIRTranslation.cpp File Reference
#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 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)
 

Function Documentation

◆ convertCallLLVMIntrinsicOp()

static LogicalResult convertCallLLVMIntrinsicOp ( CallIntrinsicOp  op,
llvm::IRBuilderBase &  builder,
LLVM::ModuleTranslation moduleTranslation 
)
static

Builder for LLVM_CallIntrinsicOp.

Definition at line 107 of file LLVMToLLVMIRTranslation.cpp.

◆ convertLinkerOptionsOp()

static void convertLinkerOptionsOp ( ArrayAttr  options,
llvm::IRBuilderBase &  builder,
LLVM::ModuleTranslation moduleTranslation 
)
static

◆ convertOperationImpl()

static LogicalResult convertOperationImpl ( Operation opInst,
llvm::IRBuilderBase &  builder,
LLVM::ModuleTranslation moduleTranslation 
)
static

◆ diagStr()

static std::string diagStr ( const llvm::Type *  type)
static

Convert an LLVM type to a string for printing in diagnostics.

Definition at line 61 of file LLVMToLLVMIRTranslation.cpp.

◆ extractPosition()

static SmallVector<unsigned> extractPosition ( ArrayRef< int64_t >  indices)
static

Convert the value of a DenseI64ArrayAttr to a vector of unsigned indices.

Definition at line 54 of file LLVMToLLVMIRTranslation.cpp.

◆ getFastmathFlags()

static llvm::FastMathFlags getFastmathFlags ( FastmathFlagsInterface &  op)
static

Definition at line 31 of file LLVMToLLVMIRTranslation.cpp.

Referenced by convertOperationImpl().

◆ getOverloadedDeclaration()

static FailureOr<llvm::Function *> getOverloadedDeclaration ( CallIntrinsicOp  op,
llvm::Intrinsic::ID  id,
llvm::Module *  module,
LLVM::ModuleTranslation moduleTranslation 
)
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.