[Mlir-commits] [mlir] [MLIR][Bufferization] Bail on automatic deallocation to enable reentrant behaviour (PR #72289)
Nicolas Vasilache
llvmlistbot at llvm.org
Wed Nov 15 04:55:04 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
----------------
nicolasvasilache wrote:
nit: "running it twice ... crashes the compiler" seems like it describes the state prior to this PR
so the comment is immediately stale ?
https://github.com/llvm/llvm-project/pull/72289
More information about the Mlir-commits
mailing list