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

Uday Bondhugula llvmlistbot at llvm.org
Fri Apr 4 07:52:30 PDT 2025


================
@@ -243,16 +244,18 @@ LogicalResult replaceAllMemRefUsesWith(Value oldMemRef, Value newMemRef,
                                        ArrayRef<Value> symbolOperands = {},
                                        bool allowNonDereferencingOps = false);
 
-/// Rewrites the memref defined by this alloc op to have an identity layout map
-/// and updates all its indexing uses. Returns failure if any of its uses
-/// escape (while leaving the IR in a valid state).
+/// Rewrites the memref defined by alloc or reinterpret_cast op to have an
+/// identity layout map and updates all its indexing uses. Returns failure if
+/// any of its uses escape (while leaving the IR in a valid state).
 template <typename AllocLikeOp>
 LogicalResult normalizeMemRef(AllocLikeOp *op);
 extern template LogicalResult
 normalizeMemRef<memref::AllocaOp>(memref::AllocaOp *op);
 extern template LogicalResult
 normalizeMemRef<memref::AllocOp>(memref::AllocOp *op);
----------------
bondhugula wrote:

But it is an input argument or output argument or both? Is it nullable or not? It's time to update such a key thing in the doc comment.

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


More information about the Mlir-commits mailing list