[Mlir-commits] [mlir] 5c6eefb - [mlir][bufferization] LowerDeallocation: declare helper function private (#67408)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Sep 26 03:35:47 PDT 2023
Author: Martin Erhart
Date: 2023-09-26T12:35:42+02:00
New Revision: 5c6eefb252e3b16191fac684de7285812769778d
URL: https://github.com/llvm/llvm-project/commit/5c6eefb252e3b16191fac684de7285812769778d
DIFF: https://github.com/llvm/llvm-project/commit/5c6eefb252e3b16191fac684de7285812769778d.diff
LOG: [mlir][bufferization] LowerDeallocation: declare helper function private (#67408)
Added:
Modified:
mlir/lib/Dialect/Bufferization/Transforms/LowerDeallocations.cpp
mlir/test/Dialect/Bufferization/Transforms/lower-deallocations.mlir
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Bufferization/Transforms/LowerDeallocations.cpp b/mlir/lib/Dialect/Bufferization/Transforms/LowerDeallocations.cpp
index c7052434f2c3be6..982d9558d313260 100644
--- a/mlir/lib/Dialect/Bufferization/Transforms/LowerDeallocations.cpp
+++ b/mlir/lib/Dialect/Bufferization/Transforms/LowerDeallocations.cpp
@@ -432,6 +432,7 @@ func::FuncOp mlir::bufferization::buildDeallocationLibraryFunction(
// Generate the func operation itself.
auto helperFuncOp = func::FuncOp::create(
loc, "dealloc_helper", builder.getFunctionType(argTypes, {}));
+ helperFuncOp.setVisibility(SymbolTable::Visibility::Private);
symbolTable.insert(helperFuncOp);
auto &block = helperFuncOp.getFunctionBody().emplaceBlock();
block.addArguments(argTypes, SmallVector<Location>(argTypes.size(), loc));
diff --git a/mlir/test/Dialect/Bufferization/Transforms/lower-deallocations.mlir b/mlir/test/Dialect/Bufferization/Transforms/lower-deallocations.mlir
index 19d3bbf7089c10d..2c69fcab08a8d6a 100644
--- a/mlir/test/Dialect/Bufferization/Transforms/lower-deallocations.mlir
+++ b/mlir/test/Dialect/Bufferization/Transforms/lower-deallocations.mlir
@@ -120,7 +120,7 @@ func.func @conversion_dealloc_multiple_memrefs_and_retained(%arg0: memref<2xf32>
// CHECK: memref.dealloc [[RETAIN_CONDS]]
// CHECK: return [[OWNERSHIP0]], [[OWNERSHIP1]]
-// CHECK: func @dealloc_helper
+// CHECK: func private @dealloc_helper
// CHECK-SAME: ([[TO_DEALLOC_MR:%.+]]: memref<?xindex>, [[TO_RETAIN_MR:%.+]]: memref<?xindex>,
// CHECK-SAME: [[CONDS:%.+]]: memref<?xi1>, [[DEALLOC_CONDS_OUT:%.+]]: memref<?xi1>,
// CHECK-SAME: [[RETAIN_CONDS_OUT:%.+]]: memref<?xi1>)
More information about the Mlir-commits
mailing list