[Mlir-commits] [mlir] [mlir][bufferization] Fix promote-buffers-to-stack crash caused by nested memref (PR #127441)

Longsheng Mou llvmlistbot at llvm.org
Mon Feb 24 23:39:44 PST 2025


================
@@ -89,6 +89,11 @@ static bool defaultIsSmallAlloc(Value alloc, unsigned maximumSizeInBytes,
   auto type = dyn_cast<ShapedType>(alloc.getType());
   if (!type || !alloc.getDefiningOp<memref::AllocOp>())
     return false;
+  auto elementType = type.getElementType();
+  // Not support nested memref type.
+  if (isa<MemRefType>(elementType))
----------------
CoTinker wrote:

Great idea. 

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


More information about the Mlir-commits mailing list