Skip to content

Commit 182a59d

Browse files
[mlir][bufferization][NFC] Add convenience overload for buildBufferDeallocationPipeline (#171305)
Add an overload that does not take any options and uses the default options instead.
1 parent 0768068 commit 182a59d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

mlir/include/mlir/Dialect/Bufferization/Pipelines/Passes.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ struct BufferDeallocationPipelineOptions
4747
/// One-Shot bufferization pass.
4848
void buildBufferDeallocationPipeline(
4949
OpPassManager &pm, const BufferDeallocationPipelineOptions &options);
50+
void buildBufferDeallocationPipeline(OpPassManager &pm);
5051

5152
/// Registers all pipelines for the `bufferization` dialect. Currently,
5253
/// this includes only the "buffer-deallocation-pipeline".

mlir/lib/Dialect/Bufferization/Pipelines/BufferizationPipelines.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
// Pipeline implementation.
1818
//===----------------------------------------------------------------------===//
1919

20+
void mlir::bufferization::buildBufferDeallocationPipeline(OpPassManager &pm) {
21+
buildBufferDeallocationPipeline(pm, BufferDeallocationPipelineOptions());
22+
}
23+
2024
void mlir::bufferization::buildBufferDeallocationPipeline(
2125
OpPassManager &pm, const BufferDeallocationPipelineOptions &options) {
2226
memref::ExpandReallocPassOptions expandAllocPassOptions{
@@ -44,5 +48,7 @@ void mlir::bufferization::registerBufferizationPipelines() {
4448
"The default pipeline for automatically inserting deallocation "
4549
"operations after one-shot bufferization. Deallocation operations "
4650
"(except `memref.realloc`) may not be present already.",
47-
buildBufferDeallocationPipeline);
51+
[](OpPassManager &pm, const BufferDeallocationPipelineOptions &options) {
52+
buildBufferDeallocationPipeline(pm, options);
53+
});
4854
}

0 commit comments

Comments
 (0)