[Mlir-commits] [mlir] [MLIR][buffer-deallocation] Introduce copies only for MemRef typed values. (PR #121582)

Matthias Springer llvmlistbot at llvm.org
Tue Jan 7 00:22:36 PST 2025


================
@@ -308,6 +308,9 @@ class BufferDeallocation : public BufferPlacementTransformationBase {
 
     // Add new allocs and additional clone operations.
     for (Value value : valuesToFree) {
+      if (!isa<BaseMemRefType>(value.getType())) {
----------------
matthias-springer wrote:

Can you put the check earlier, so that non-memref values are not even added to `valuesToFree`?

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


More information about the Mlir-commits mailing list