Lines Matching defs:subview
48 /// From `subview(memref, subOffset, subSizes, subStrides))` compute
61 memref::SubViewOp subview) {
62 // Build a plain extract_strided_metadata(memref) from subview(memref).
63 Location origLoc = subview.getLoc();
64 Value source = subview.getSource();
73 auto [resultStrides, resultOffset] = subview.getType().getStridesAndOffset();
80 SmallVector<OpFoldResult> subStrides = subview.getMixedStrides();
92 SmallVector<OpFoldResult> subOffsets = subview.getMixedOffsets();
119 // the subview op (if both are static).
127 // Thus we need 1 + 1 + subview.getRank() + subview.getRank(), to hold all
129 auto subType = cast<MemRefType>(subview.getType());
133 // the subview.
138 SmallVector<OpFoldResult> subSizes = subview.getMixedSizes();
139 llvm::SmallBitVector droppedDims = subview.getDroppedDims();
148 // Iteration variable for result dimensions of the subview op.
159 // the subview op (if both are static).
173 /// Replace `dst = subview(memref, subOffset, subSizes, subStrides))`
185 /// In other words, get rid of the subview in that expression and canonicalize
191 LogicalResult matchAndRewrite(memref::SubViewOp subview,
194 resolveSubviewStridedMetadata(rewriter, subview);
196 return rewriter.notifyMatchFailure(subview,
197 "failed to resolve subview metadata");
201 subview, subview.getType(), stridedMetadata->basePtr,
208 /// Pattern to replace `extract_strided_metadata(subview)`
235 op, "failed to resolve metadata in terms of source subview op");