[Mlir-commits] [mlir] [memref] Support non-scalar copies in `reinterpret_cast` elision (PR #203873)

Andrzej WarzyƄski llvmlistbot at llvm.org
Wed Jun 17 09:55:05 PDT 2026


================
@@ -29,6 +30,10 @@ using namespace mlir;
 
 namespace {
 
+/// Copy rewrite helpers
+
+/// The copy rewrite stores directly into the reinterpret_cast source, so it
+/// needs concrete base strides instead of layout-map reasoning.
----------------
banach-space wrote:

This comment documents _how_ this method is used in `getCopyFromReinterCastInfo`. That's an implementation detail of `getCopyFromReinterCastInfo` that should be documented in `getCopyFromReinterCastInfo` . 

Instead, this comment should be more generic and should now make no assumptions about the users of `getIdentityStrides`.  For example:

> Given MemRefType `type`, returns a vector of strides corresponding to identity layout.

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


More information about the Mlir-commits mailing list