@@ -30,25 +30,6 @@ using DeallocHelperMap = llvm::DenseMap<Operation *, func::FuncOp>;
30
30
#define GEN_PASS_DECL
31
31
#include " mlir/Dialect/Bufferization/Transforms/Passes.h.inc"
32
32
33
- // / Creates an instance of the OwnershipBasedBufferDeallocation pass to free all
34
- // / allocated buffers.
35
- std::unique_ptr<Pass> createOwnershipBasedBufferDeallocationPass (
36
- DeallocationOptions options = DeallocationOptions());
37
-
38
- // / Creates a pass that finds all temporary allocations
39
- // / and attempts to move the deallocation after the last user/dependency
40
- // / of the allocation, thereby optimizing allocation liveness.
41
- std::unique_ptr<Pass> createOptimizeAllocationLivenessPass ();
42
-
43
- // / Creates a pass that optimizes `bufferization.dealloc` operations. For
44
- // / example, it reduces the number of alias checks needed at runtime using
45
- // / static alias analysis.
46
- std::unique_ptr<Pass> createBufferDeallocationSimplificationPass ();
47
-
48
- // / Creates an instance of the LowerDeallocations pass to lower
49
- // / `bufferization.dealloc` operations to the `memref` dialect.
50
- std::unique_ptr<Pass> createLowerDeallocationsPass ();
51
-
52
33
// / Adds the conversion pattern of the `bufferization.dealloc` operation to the
53
34
// / given pattern set for use in other transformation passes.
54
35
void populateBufferizationDeallocLoweringPattern (
@@ -141,14 +122,6 @@ func::FuncOp buildDeallocationLibraryFunction(OpBuilder &builder, Location loc,
141
122
LogicalResult deallocateBuffersOwnershipBased (FunctionOpInterface op,
142
123
DeallocationOptions options);
143
124
144
- // / Creates a pass that moves allocations upwards to reduce the number of
145
- // / required copies that are inserted during the BufferDeallocation pass.
146
- std::unique_ptr<Pass> createBufferHoistingPass ();
147
-
148
- // / Creates a pass that moves allocations upwards out of loops. This avoids
149
- // / reallocations inside of loops.
150
- std::unique_ptr<Pass> createBufferLoopHoistingPass ();
151
-
152
125
// Options struct for BufferResultsToOutParams pass.
153
126
// Note: defined only here, not in tablegen.
154
127
struct BufferResultsToOutParamsOpts {
@@ -192,51 +165,20 @@ struct BufferResultsToOutParamsOpts {
192
165
bool hoistStaticAllocs = false ;
193
166
};
194
167
195
- // / Creates a pass that converts memref function results to out-params.
196
- std::unique_ptr<Pass> createBufferResultsToOutParamsPass (
197
- const BufferResultsToOutParamsOpts &options = {});
198
-
199
168
// / Replace buffers that are returned from a function with an out parameter.
200
169
// / Also update all call sites.
201
170
LogicalResult
202
171
promoteBufferResultsToOutParams (ModuleOp module ,
203
172
const BufferResultsToOutParamsOpts &options);
204
173
205
- // / Creates a pass that drops memref function results that are equivalent to a
206
- // / function argument.
207
- std::unique_ptr<Pass> createDropEquivalentBufferResultsPass ();
208
-
209
- // / Create a pass that rewrites tensor.empty to bufferization.alloc_tensor.
210
- std::unique_ptr<Pass> createEmptyTensorToAllocTensorPass ();
211
-
212
174
// / Drop all memref function results that are equivalent to a function argument.
213
175
LogicalResult dropEquivalentBufferResults (ModuleOp module );
214
176
215
- // / Create a pass that bufferizes all ops that implement BufferizableOpInterface
216
- // / with One-Shot Bufferize.
217
- std::unique_ptr<Pass> createOneShotBufferizePass ();
218
-
219
- // / Create a pass that bufferizes all ops that implement BufferizableOpInterface
220
- // / with One-Shot Bufferize and the specified bufferization options.
221
- std::unique_ptr<Pass>
222
- createOneShotBufferizePass (const OneShotBufferizationOptions &options);
223
-
224
- // / Creates a pass that promotes heap-based allocations to stack-based ones.
225
- // / Only buffers smaller than the provided size are promoted.
226
- // / Dynamic shaped buffers are promoted up to the given rank.
227
- std::unique_ptr<Pass>
228
- createPromoteBuffersToStackPass (unsigned maxAllocSizeInBytes = 1024 ,
229
- unsigned maxRankOfAllocatedMemRef = 1 );
230
-
231
177
// / Creates a pass that promotes heap-based allocations to stack-based ones.
232
178
// / Only buffers smaller with `isSmallAlloc(alloc) == true` are promoted.
233
179
std::unique_ptr<Pass>
234
180
createPromoteBuffersToStackPass (std::function<bool (Value)> isSmallAlloc);
235
181
236
- // / Create a pass that tries to eliminate tensor.empty ops that are anchored on
237
- // / insert_slice ops.
238
- std::unique_ptr<Pass> createEmptyTensorEliminationPass ();
239
-
240
182
// ===----------------------------------------------------------------------===//
241
183
// Registration
242
184
// ===----------------------------------------------------------------------===//
0 commit comments