[llvm] [mlir][bufferization] Don't clone on unknown ownership and verify function boundary ABI (PR #66626)

Matthias Springer via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 27 01:20:24 PDT 2023


================
@@ -95,7 +95,17 @@ struct DeallocationOptions {
   // A pass option indicating whether private functions should be modified to
   // pass the ownership of MemRef values instead of adhering to the function
   // boundary ABI.
-  bool privateFuncDynamicOwnership = false;
+  bool privateFuncDynamicOwnership = true;
+
+  /// Inserts `cf.assert` operations to verify the function boundary ABI at
+  /// runtime. Currently, it is only checked that the ownership of returned
+  /// MemRefs is 'true'. This makes sure that ownership is yielded and the
----------------
matthias-springer wrote:

`This makes sure that ownership is yielded` -> `This also ensures that the returned memref does not originate from the same allocation as a function argument.`

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


More information about the llvm-commits mailing list