[Mlir-commits] [mlir] [MLIR][Bufferization] Bail on automatic deallocation to enable reentrant behaviour (PR #72289)
Renato Golin
llvmlistbot at llvm.org
Wed Nov 15 05:16:34 PST 2023
================
@@ -861,9 +861,15 @@ BufferDeallocation::handleInterface(MemoryEffectOpInterface op) {
for (auto operand : llvm::make_filter_range(op->getOperands(), isMemref)) {
if (op.getEffectOnValue<MemoryEffects::Free>(operand).has_value()) {
- if (!op->hasAttr(BufferizationDialect::kManualDeallocation))
- return op->emitError(
- "memory free side-effect on MemRef value not supported!");
+ // This should not be an error because the ownership based buffer
+ // deallocation introduces deallocs itself, so running it twice over (say
+ // when piping IR over different tools with their own pipelines) crashes
----------------
rengolin wrote:
Good point, let me try to rephrase it.
https://github.com/llvm/llvm-project/pull/72289
More information about the Mlir-commits
mailing list