aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorMartin Erhart <merhart@google.com>2023-08-30 16:11:53 +0000
committerMartin Erhart <merhart@google.com>2023-08-31 07:10:31 +0000
commit950f0944c95a5416415786487a1263de2dfcec13 (patch)
tree94d43f6b00f6de066cbe1d67493d213977249940 /flang/lib/Frontend/CompilerInvocation.cpp
parent4fdc019a89105c956d4c79fb79ca1b416eaa72f2 (diff)
downloadllvm-950f0944c95a5416415786487a1263de2dfcec13.zip
llvm-950f0944c95a5416415786487a1263de2dfcec13.tar.gz
llvm-950f0944c95a5416415786487a1263de2dfcec13.tar.bz2
[mlir][bufferization] Factor out bufferization.dealloc lowering into separate pass
Moves the lowering of `bufferization.dealloc` to memref into a separate pass, but still registers the pattern in the conversion pass. This is helpful when some tensor values (and thus `to_memref` or `to_tensor` operations) still remain, e.g., when the function boundaries are not converted, or when constant tensors are converted to memref.get_global at a later point. However, it is still recommended to perform all bufferization before deallocation to avoid memory leaks as all memref allocations inserted after the deallocation pass was applied, have to be handled manually. Note: The buffer deallocation pass assumes that memref values defined by `bufferization.to_memref` don't return ownership and don't have to be deallocated. `bufferization.to_tensor` operations are handled similarly to `bufferization.clone` operations with the exception that the result value is not handled because it's a tensor (not a memref). Reviewed By: springerm Differential Revision: https://reviews.llvm.org/D159180
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions