[Mlir-commits] [mlir] [mlir] Add Memref Normalization support for reinterpret_cast op (PR #133417)

Uday Bondhugula llvmlistbot at llvm.org
Fri Apr 4 07:59:10 PDT 2025


================
@@ -363,6 +363,15 @@ void NormalizeMemRefs::normalizeFuncOpMemRefs(func::FuncOp funcOp,
   for (memref::AllocaOp allocaOp : allocaOps)
     (void)normalizeMemRef(&allocaOp);
 
+  // Turn memrefs' non-identity layouts maps into ones with identity. Collect
+  // reinterpret_cast ops first and then process since normalizeMemRef
+  // replaces/erases ops during memref rewriting.
+  SmallVector<memref::ReinterpretCastOp> reinterpretCastOps;
----------------
bondhugula wrote:

You are in memref transforms. You shouldn't be needing `memref::`. There should be a `using` already. If not, add it in general or for this op.

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


More information about the Mlir-commits mailing list