[Mlir-commits] [mlir] [MLIR][Bufferization] BufferResultsToOutParams: Add an option to eliminate AllocOp and avoid Copy (PR #90011)
Matthias Springer
llvmlistbot at llvm.org
Tue Apr 30 02:33:41 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:
A new allocation is indeed always placed at the call site. But I would call this "hoisting" only if an equivalent allocation is removed in the body of the callee. (Hoisting = Moving) This happens only if `hoist-static-allocs=1`.
https://github.com/llvm/llvm-project/pull/90011
More information about the Mlir-commits
mailing list