#include "mlir/Conversion/LLVMCommon/Pattern.h"
#include "mlir/Dialect/LLVMIR/FunctionCallUtils.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/Dialect/LLVMIR/LLVMTypes.h"
#include "mlir/IR/AffineMap.h"
#include "mlir/IR/BuiltinAttributes.h"
usingnamespacemlir;
ConvertToLLVMPattern::ConvertToLLVMPattern(
StringRef rootOpName, MLIRContext *context,
const LLVMTypeConverter &typeConverter, PatternBenefit benefit)
: … { … }
const LLVMTypeConverter *ConvertToLLVMPattern::getTypeConverter() const { … }
LLVM::LLVMDialect &ConvertToLLVMPattern::getDialect() const { … }
Type ConvertToLLVMPattern::getIndexType() const { … }
Type ConvertToLLVMPattern::getIntPtrType(unsigned addressSpace) const { … }
Type ConvertToLLVMPattern::getVoidType() const { … }
Type ConvertToLLVMPattern::getVoidPtrType() const { … }
Value ConvertToLLVMPattern::createIndexAttrConstant(OpBuilder &builder,
Location loc,
Type resultType,
int64_t value) { … }
Value ConvertToLLVMPattern::getStridedElementPtr(
Location loc, MemRefType type, Value memRefDesc, ValueRange indices,
ConversionPatternRewriter &rewriter) const { … }
bool ConvertToLLVMPattern::isConvertibleAndHasIdentityMaps(
MemRefType type) const { … }
Type ConvertToLLVMPattern::getElementPtrType(MemRefType type) const { … }
void ConvertToLLVMPattern::getMemRefDescriptorSizes(
Location loc, MemRefType memRefType, ValueRange dynamicSizes,
ConversionPatternRewriter &rewriter, SmallVectorImpl<Value> &sizes,
SmallVectorImpl<Value> &strides, Value &size, bool sizeInBytes) const { … }
Value ConvertToLLVMPattern::getSizeInBytes(
Location loc, Type type, ConversionPatternRewriter &rewriter) const { … }
Value ConvertToLLVMPattern::getNumElements(
Location loc, MemRefType memRefType, ValueRange dynamicSizes,
ConversionPatternRewriter &rewriter) const { … }
MemRefDescriptor ConvertToLLVMPattern::createMemRefDescriptor(
Location loc, MemRefType memRefType, Value allocatedPtr, Value alignedPtr,
ArrayRef<Value> sizes, ArrayRef<Value> strides,
ConversionPatternRewriter &rewriter) const { … }
LogicalResult ConvertToLLVMPattern::copyUnrankedDescriptors(
OpBuilder &builder, Location loc, TypeRange origTypes,
SmallVectorImpl<Value> &operands, bool toDynamic) const { … }
void LLVM::detail::setNativeProperties(Operation *op,
IntegerOverflowFlags overflowFlags) { … }
LogicalResult LLVM::detail::oneToOneRewrite(
Operation *op, StringRef targetOp, ValueRange operands,
ArrayRef<NamedAttribute> targetAttrs,
const LLVMTypeConverter &typeConverter, ConversionPatternRewriter &rewriter,
IntegerOverflowFlags overflowFlags) { … }