[llvm] [mlir][bufferization] Add an ownership based buffer deallocation pass (PR #66337)

Matthias Springer via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 14 02:51:02 PDT 2023


================
@@ -300,6 +303,607 @@ One-Shot Bufferize can be configured to leak all memory and not generate any
 buffer deallocations with `create-deallocs=0`. This can be useful for
 compatibility with legacy code that has its own method of deallocating buffers.
 
+## Ownership-based Buffer Deallocation
+
+Recommended compilation pipeline:
+```
+one-shot-bufferize
+       |          it's recommended to perform all bufferization here at latest,
+       |       <- any allocations inserted after this point have to be handled
+       V          manually
+expand-realloc
+       V
+buffer-deallocation
----------------
matthias-springer wrote:

`ownership-based-buffer-deallocation`

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


More information about the llvm-commits mailing list