[Mlir-commits] [mlir] Normalize reinterpret_cast op (PR #133417)

Arnab Dutta llvmlistbot at llvm.org
Sun Mar 30 21:11:45 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);
----------------
arnab-polymage wrote:

It is not clear to me as well. I just followed the exisiting convention (used pointer for reinterpret_cast op as we alrady had pointers for alloc ops).

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


More information about the Mlir-commits mailing list