summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorMenooker <yijie.mei@intel.com>2024-05-08 10:14:52 +0800
committerGitHub <noreply@github.com>2024-05-08 10:14:52 +0800
commit0af448b71116ae93eae1cb9c3121cb94be076fc3 (patch)
tree6093ab564ec0c0fa858ab1dbdf47ac73800e4e47 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parentbb01b89cda71fe1594a87f81b3f3c01f66fcac59 (diff)
[MLIR][Bufferization] BufferResultsToOutParams: Add an option to eliminate AllocOp and avoid Copy (#90011)
Add an option hoist-static-allocs to remove the unnecessary memref.alloc and memref.copy after this pass, when the memref in ReturnOp is allocated by memref.alloc and is statically shaped. Instead, it replaces the uses of the allocated memref with the memref in the out argument. By default, BufferResultsToOutParams will result in a memcpy operation to copy the originally returned memref to the output argument memref. This is inefficient when the source of memcpy (the returned memref in the original ReturnOp) is from a local AllocOp. The pass can use the output argument memref to replace the locally allocated memref for better performance.hoist-static-allocs avoids dynamic allocation and memory movement. This option will be critical for performance-sensivtive applications, which require BufferResultsToOutParams pass for a caller-owned output buffer calling convension.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions