MLIR 22.0.0git
MemRefUtils.cpp File Reference

Go to the source code of this file.

Namespaces

namespace  mlir
 Include the generated interface declarations.
namespace  mlir::memref

Functions

bool mlir::memref::isStaticShapeAndContiguousRowMajor (MemRefType type)
 Returns true, if the memref type has static shapes and represents a contiguous chunk of memory.
std::pair< LinearizedMemRefInfo, OpFoldResultmlir::memref::getLinearizedMemRefOffsetAndSize (OpBuilder &builder, Location loc, int srcBits, int dstBits, OpFoldResult offset, ArrayRef< OpFoldResult > sizes, ArrayRef< OpFoldResult > strides, ArrayRef< OpFoldResult > indices={})
LinearizedMemRefInfo mlir::memref::getLinearizedMemRefOffsetAndSize (OpBuilder &builder, Location loc, int srcBits, int dstBits, OpFoldResult offset, ArrayRef< OpFoldResult > sizes)
 For a memref with offset and sizes, returns the offset and size to use for the linearized memref, assuming that the strides are computed from a row-major ordering of the sizes;.
static bool mlir::memref::resultIsNotRead (Operation *op, std::vector< Operation * > &uses)
 Returns true if all the uses of op are not read/load.
void mlir::memref::eraseDeadAllocAndStores (RewriterBase &rewriter, Operation *parentOp)
 Track temporary allocations that are never read from.
static SmallVector< OpFoldResultmlir::memref::computeSuffixProductIRBlockImpl (Location loc, OpBuilder &builder, ArrayRef< OpFoldResult > sizes, OpFoldResult unit)
SmallVector< OpFoldResultmlir::memref::computeSuffixProductIRBlock (Location loc, OpBuilder &builder, ArrayRef< OpFoldResult > sizes)
 Given a set of sizes, return the suffix product.
MemrefValue mlir::memref::skipFullyAliasingOperations (MemrefValue source)
 Walk up the source chain until an operation that changes/defines the view of memory is found (i.e.
MemrefValue mlir::memref::skipViewLikeOps (MemrefValue source)
 Walk up the source chain until we find an operation that is not a view of the source memref (i.e.
LogicalResult mlir::memref::resolveSourceIndicesExpandShape (Location loc, PatternRewriter &rewriter, memref::ExpandShapeOp expandShapeOp, ValueRange indices, SmallVectorImpl< Value > &sourceIndices, bool startsInbounds)
 Given the 'indices' of a load/store operation where the memref is a result of a expand_shape op, returns the indices w.r.t to the source memref of the expand_shape op.
LogicalResult mlir::memref::resolveSourceIndicesCollapseShape (Location loc, PatternRewriter &rewriter, memref::CollapseShapeOp collapseShapeOp, ValueRange indices, SmallVectorImpl< Value > &sourceIndices)
 Given the 'indices' of a load/store operation where the memref is a result of a collapse_shape op, returns the indices w.r.t to the source memref of the collapse_shape op.