Deallocation operations where the allocated value is the 'memref' and
'retained' list are currently not supported. This is because when values
are in the retained list, they typically have a use-site at a later
point and another deallocation op exists at that later point to free the
memref then. There alrady exists a canonicalization pattern in the
buffer deallocation simplification pass that removes the allocated value
from the earlier dealloc because it will never be actually deallocated
in that case and thus does not have to be considered in this new
pattern.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
memref.alloc ops have a side effect. Do they fold away if if they have no uses? (without this pattern)
Comment Actions
Yes they do fold away when running -canonicalize because they only have the allocation side-effect. Should we rely on that instead of manually deleting the alloc op in the pattern?