[Mlir-commits] [mlir] [mlir][linalg] Hoist transfer pairs through disjoint subview slices (PR #220244)

Hugo Pompougnac llvmlistbot at llvm.org
Fri Sep 4 02:52:04 PDT 2026


================
@@ -351,5 +352,120 @@ bool hasNegativeStaticStride(MemRefType memRefTy) {
   });
 }
 
+namespace {
+/// Static footprint of a memref value resolved through a chain of
+/// rank-preserving, unit-stride `memref.subview` ops: the underlying root
+/// memref and, per root dimension, the `[offset, offset + size)` interval it
+/// covers.
----------------
qaco wrote:

Good point. The "I don't know" case is already modelled by the `std::optional` returned from `resolveSubviewFootprint`: it returns `std::nullopt` whenever the footprint isn't provably static, including a chain that mixes static and dynamic offsets/sizes (and also non-unit strides, rank-reducing subviews, or a non-buffer root). So a `SubviewFootprint` only ever holds a fully-static footprint. I've extended the struct comment to make this explicit.

https://github.com/llvm/llvm-project/pull/220244


More information about the Mlir-commits mailing list