Skip to content

Commit f54d9eb

Browse files
[mlir][SCF] Remove scf-bufferize pass
1 parent 5621929 commit f54d9eb

File tree

6 files changed

+1
-175
lines changed

6 files changed

+1
-175
lines changed

mlir/docs/Bufferization.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,6 @@ The code, slightly simplified and annotated, is reproduced here:
579579
// Partial bufferization passes.
580580
pm.addPass(createTensorConstantBufferizePass());
581581
pm.addNestedPass<func::FuncOp>(createTCPBufferizePass()); // Bufferizes the downstream `tcp` dialect.
582-
pm.addNestedPass<func::FuncOp>(createSCFBufferizePass());
583582
pm.addNestedPass<func::FuncOp>(createLinalgBufferizePass());
584583
pm.addNestedPass<func::FuncOp>(createTensorBufferizePass());
585584
pm.addPass(createFuncBufferizePass());
@@ -596,7 +595,7 @@ must be module passes because they make changes to the top-level module.
596595

597596
The bulk of the bufferization work is done by the function passes. Most of these
598597
passes are provided as part of the upstream MLIR distribution and bufferize
599-
their respective dialects (e.g. `scf-bufferize` bufferizes the `scf` dialect).
598+
their respective dialects (e.g. `abc-bufferize` bufferizes the `abc` dialect).
600599
The `tcp-bufferize` pass is an exception -- it is a partial bufferization pass
601600
used to bufferize the downstream `tcp` dialect, and fits in perfectly with all
602601
the other passes provided upstream.
@@ -694,20 +693,6 @@ which helps with this in general.
694693

695694
### Other partial bufferization examples
696695

697-
- `scf-bufferize`
698-
([code](https://github.com/llvm/llvm-project/blob/bc8acf2ce8ad6e8c9b1d97b2e02d3f4ad26e1d9d/mlir/lib/Dialect/SCF/Transforms/Bufferize.cpp#L1),
699-
[test](https://github.com/llvm/llvm-project/blob/bc8acf2ce8ad6e8c9b1d97b2e02d3f4ad26e1d9d/mlir/test/Dialect/SCF/bufferize.mlir#L1))
700-
701-
- Bufferizes ops from the `scf` dialect.
702-
- This is an example of how to bufferize ops that implement
703-
`RegionBranchOpInterface` (that is, they use regions to represent
704-
control flow).
705-
- The bulk of the work is done by
706-
`lib/Dialect/SCF/Transforms/StructuralTypeConversions.cpp`
707-
([code](https://github.com/llvm/llvm-project/blob/daaaed6bb89044ac58a23f1bb1ccdd12342a5a58/mlir/lib/Dialect/SCF/Transforms/StructuralTypeConversions.cpp#L1)),
708-
which is well-commented and covers how to correctly convert ops that
709-
contain regions.
710-
711696
- `func-bufferize`
712697
([code](https://github.com/llvm/llvm-project/blob/2f5715dc78328215d51d5664c72c632a6dac1046/mlir/lib/Dialect/Func/Transforms/FuncBufferize.cpp#L1),
713698
[test](https://github.com/llvm/llvm-project/blob/2f5715dc78328215d51d5664c72c632a6dac1046/mlir/test/Dialect/Func/func-bufferize.mlir#L1))

mlir/include/mlir/Dialect/SCF/Transforms/Passes.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ namespace mlir {
2020
#define GEN_PASS_DECL
2121
#include "mlir/Dialect/SCF/Transforms/Passes.h.inc"
2222

23-
/// Creates a pass that bufferizes the SCF dialect.
24-
std::unique_ptr<Pass> createSCFBufferizePass();
25-
2623
/// Creates a pass that specializes for loop for unrolling and
2724
/// vectorization.
2825
std::unique_ptr<Pass> createForLoopSpecializationPass();

mlir/include/mlir/Dialect/SCF/Transforms/Passes.td

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@
1111

1212
include "mlir/Pass/PassBase.td"
1313

14-
def SCFBufferize : Pass<"scf-bufferize"> {
15-
let summary = "Bufferize the scf dialect.";
16-
let constructor = "mlir::createSCFBufferizePass()";
17-
let dependentDialects = ["bufferization::BufferizationDialect",
18-
"memref::MemRefDialect"];
19-
}
20-
2114
// Note: Making these canonicalization patterns would require a dependency
2215
// of the SCF dialect on the Affine/Tensor/MemRef dialects or vice versa.
2316
def SCFForLoopCanonicalization

mlir/lib/Dialect/SCF/Transforms/Bufferize.cpp

Lines changed: 0 additions & 47 deletions
This file was deleted.

mlir/lib/Dialect/SCF/Transforms/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
add_mlir_dialect_library(MLIRSCFTransforms
22
BufferDeallocationOpInterfaceImpl.cpp
33
BufferizableOpInterfaceImpl.cpp
4-
Bufferize.cpp
54
ForallToFor.cpp
65
ForallToParallel.cpp
76
ForToWhile.cpp

mlir/test/Dialect/SCF/bufferize.mlir

Lines changed: 0 additions & 101 deletions
This file was deleted.

0 commit comments

Comments
 (0)