9 #ifndef MLIR_DIALECT_AFFINE_VIEWLIKEINTERFACEUTILS_H
10 #define MLIR_DIALECT_AFFINE_VIEWLIKEINTERFACEUTILS_H
32 ArrayRef<OpFoldResult> producerOffsets,
33 ArrayRef<OpFoldResult> producerSizes,
34 ArrayRef<OpFoldResult> producerStrides,
35 const llvm::SmallBitVector &droppedProducerDims,
36 ArrayRef<OpFoldResult> consumerOffsets,
37 ArrayRef<OpFoldResult> consumerSizes,
38 ArrayRef<OpFoldResult> consumerStrides,
39 SmallVector<OpFoldResult> &combinedOffsets,
40 SmallVector<OpFoldResult> &combinedSizes,
41 SmallVector<OpFoldResult> &combinedStrides);
49 OffsetSizeAndStrideOpInterface producer,
50 OffsetSizeAndStrideOpInterface consumer,
51 const llvm::SmallBitVector &droppedProducerDims,
52 SmallVector<OpFoldResult> &combinedOffsets,
53 SmallVector<OpFoldResult> &combinedSizes,
54 SmallVector<OpFoldResult> &combinedStrides);
75 RewriterBase &rewriter, Location loc,
76 ArrayRef<OpFoldResult> mixedSourceOffsets,
77 ArrayRef<OpFoldResult> mixedSourceStrides,
78 const llvm::SmallBitVector &rankReducedDims,
79 ArrayRef<OpFoldResult> consumerIndices,
80 SmallVectorImpl<Value> &resolvedIndices);
86 const llvm::SmallBitVector &rankReducedDims,
ValueRange consumerIndices,
89 rewriter, loc, mixedSourceOffsets, mixedSourceStrides, rankReducedDims,
101 const llvm::SmallBitVector &rankReducedSourceDims,
This class defines the main interface for locations in MLIR and acts as a non-nullable wrapper around...
This class coordinates the application of a rewrite on a set of IR, providing a way for clients to tr...
This class provides an abstraction over the different types of ranges over Values.
void resolveSizesIntoOpWithSizes(ArrayRef< OpFoldResult > sourceSizes, ArrayRef< OpFoldResult > destSizes, const llvm::SmallBitVector &rankReducedSourceDims, SmallVectorImpl< OpFoldResult > &resolvedSizes)
Given sourceSizes, destSizes and information about which dimensions are dropped by the source: rankRe...
void resolveIndicesIntoOpWithOffsetsAndStrides(RewriterBase &rewriter, Location loc, ArrayRef< OpFoldResult > mixedSourceOffsets, ArrayRef< OpFoldResult > mixedSourceStrides, const llvm::SmallBitVector &rankReducedDims, ArrayRef< OpFoldResult > consumerIndices, SmallVectorImpl< Value > &resolvedIndices)
Given the 'consumerIndices' of a load/store operation operating on an op with offsets and strides,...
LogicalResult mergeOffsetsSizesAndStrides(OpBuilder &builder, Location loc, ArrayRef< OpFoldResult > producerOffsets, ArrayRef< OpFoldResult > producerSizes, ArrayRef< OpFoldResult > producerStrides, const llvm::SmallBitVector &droppedProducerDims, ArrayRef< OpFoldResult > consumerOffsets, ArrayRef< OpFoldResult > consumerSizes, ArrayRef< OpFoldResult > consumerStrides, SmallVector< OpFoldResult > &combinedOffsets, SmallVector< OpFoldResult > &combinedSizes, SmallVector< OpFoldResult > &combinedStrides)
Fills the combinedOffsets, combinedSizes and combinedStrides to use when combining a producer slice i...
Include the generated interface declarations.
OpFoldResult getAsOpFoldResult(Value val)
Given a value, try to extract a constant Attribute.