The motivation behind this CL is the fact that the current BufferDeallocation pass supports building of tightly coupled DellocOp/CloneOp operations only. There have been many requests from the community to relax these restrictions in order to apply the BufferDeallocation pass to more domains and dialects. For this reason, this CL includes a newly introduced AllocationOpInterface to give developers the opportunity to implement their own "compatible" clone and deallocation operations.
- Introduced AllocationOpInterface to create deallocation operations on-the-fly that are compatible with the allocation operation implementing this interface.
- Added interface implementations for AllocOp and CloneOp defined in the MemRef dialect.
- Adapted the BufferDeallocation pass to be compatible with the interface introduced in this CL.
Can you reword this to better capture what this interface is intended to represent in general? If the deallocation operations are optional, I imagine we want a more general description here.