Since memrefs in the retained list will never be deallocated, we can remove them from the list of memrefs to be deallocated. If the list of memrefs to deallocate becomes empty, we can just delete the dealloc operation.
Depends on D156157
Paths
| Differential D156186
[mlir][bufferization] Add DeallocOp canonicalizer to remove memrefs also present in the retained list ClosedPublic Authored by maerhart on Jul 24 2023, 4:17 PM.
Details Summary Since memrefs in the retained list will never be deallocated, we can remove them from the list of memrefs to be deallocated. If the list of memrefs to deallocate becomes empty, we can just delete the dealloc operation. Depends on D156157
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Jul 26 2023, 1:43 PM Comment Actions Sry, forgot to submit these two comments earlier.
Closed by commit rGb0688ed0dcb6: [mlir][bufferization] Add DeallocOp canonicalizer to remove memrefs also… (authored by maerhart). · Explain WhyJul 28 2023, 9:41 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 543743 mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp
mlir/test/Dialect/Bufferization/canonicalize.mlir
|
Should this be memref?