MLIR  14.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 dependency graph for LLVMToLLVMIRTranslation.cpp:

Go to the source code of this file.

Functions

static llvm::CmpInst::Predicate getLLVMCmpPredicate (ICmpPredicate p)
 Convert MLIR integer comparison predicate to LLVM IR comparison predicate. More...
 
static llvm::CmpInst::Predicate getLLVMCmpPredicate (FCmpPredicate p)
 
static llvm::AtomicRMWInst::BinOp getLLVMAtomicBinOp (AtomicBinOp op)
 
static llvm::AtomicOrdering getLLVMAtomicOrdering (AtomicOrdering ordering)
 
static llvm::FastMathFlags getFastmathFlags (FastmathFlagsInterface &op)
 
static llvm::MDNode * getLoopOptionMetadata (llvm::LLVMContext &ctx, LoopOptionCase option, int64_t value)
 Returns an LLVM metadata node corresponding to a loop option. More...
 
static void setLoopMetadata (Operation &opInst, llvm::Instruction &llvmInst, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation)
 
static LogicalResult convertOperationImpl (Operation &opInst, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation)
 

Function Documentation

◆ convertOperationImpl()

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

◆ getFastmathFlags()

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

Definition at line 148 of file LLVMToLLVMIRTranslation.cpp.

References contract().

Referenced by convertOperationImpl().

◆ getLLVMAtomicBinOp()

static llvm::AtomicRMWInst::BinOp getLLVMAtomicBinOp ( AtomicBinOp  op)
static

Definition at line 96 of file LLVMToLLVMIRTranslation.cpp.

References max(), and min().

◆ getLLVMAtomicOrdering()

static llvm::AtomicOrdering getLLVMAtomicOrdering ( AtomicOrdering  ordering)
static

Definition at line 128 of file LLVMToLLVMIRTranslation.cpp.

◆ getLLVMCmpPredicate() [1/2]

static llvm::CmpInst::Predicate getLLVMCmpPredicate ( ICmpPredicate  p)
static

Convert MLIR integer comparison predicate to LLVM IR comparison predicate.

Definition at line 32 of file LLVMToLLVMIRTranslation.cpp.

◆ getLLVMCmpPredicate() [2/2]

static llvm::CmpInst::Predicate getLLVMCmpPredicate ( FCmpPredicate  p)
static

Definition at line 58 of file LLVMToLLVMIRTranslation.cpp.

◆ getLoopOptionMetadata()

static llvm::MDNode* getLoopOptionMetadata ( llvm::LLVMContext &  ctx,
LoopOptionCase  option,
int64_t  value 
)
static

Returns an LLVM metadata node corresponding to a loop option.

This metadata is attached to an llvm.loop node.

Definition at line 173 of file LLVMToLLVMIRTranslation.cpp.

References mlir::Constant.

Referenced by setLoopMetadata().

◆ setLoopMetadata()

static void setLoopMetadata ( Operation opInst,
llvm::Instruction &  llvmInst,
llvm::IRBuilderBase &  builder,
LLVM::ModuleTranslation moduleTranslation 
)
static