[Mlir-commits] [mlir] [MLIR][Bufferization] Bail on automatic deallocation to enable reentrant behaviour (PR #72289)

Martin Erhart llvmlistbot at llvm.org
Thu Nov 16 00:44:21 PST 2023


maerhart wrote:

I agree with what @matthias-springer said.

This PR tries to add support for existing deallocation ops without considering all necessary cases. If we want to add support, we need to do it in a way that doesn't break the existing specification of the pass (no double free, etc.). But this is hard to do properly, as Matthias already pointed out.

To add to the second point, we could add the attribute in the deallocation pass itself to those allocs it considered and the deallocs it inserts. It won't be possible to pass it IR as Matthias showed, but it would allow the deallocation pipeline to be run multiple times in sequence with the same configuration. Maybe we'd want a separate attribute, though, to differentiate manual from already automatically deallocated.


https://github.com/llvm/llvm-project/pull/72289


More information about the Mlir-commits mailing list