[Mlir-commits] [mlir] [MLIR][Bufferization] BufferResultsToOutParams: Add an option to eliminate AllocOp and avoid Copy (PR #90011)

Matthias Springer llvmlistbot at llvm.org
Sat Apr 27 09:34:24 PDT 2024


================
@@ -320,6 +320,11 @@ def BufferResultsToOutParams : Pass<"buffer-results-to-out-params", "ModuleOp">
     Option<"addResultAttribute", "add-result-attr", "bool",
        /*default=*/"false",
        "Add the attribute 'bufferize.result' to all output parameters.">,
+    Option<"avoidBufferResultAllocAndCopy", "avoid-buffer-result-alloc-copy",
+       "bool", /*default=*/"false",
+       "When the returned memref has static shape and is allocated by "
----------------
matthias-springer wrote:

This description is rendered as a table (I think when running `mlir-opt -help`) and usually just one line.

How about renaming this option to `hoist-static-allocs`? And as a description for the option: `"Hoist static allocations to call sites."` (and moving the current description to the pass description above).

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


More information about the Mlir-commits mailing list