@@ -30,25 +30,6 @@ using DeallocHelperMap = llvm::DenseMap<Operation *, func::FuncOp>;
3030#define GEN_PASS_DECL
3131#include " mlir/Dialect/Bufferization/Transforms/Passes.h.inc"
3232
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-
5233// / Adds the conversion pattern of the `bufferization.dealloc` operation to the
5334// / given pattern set for use in other transformation passes.
5435void populateBufferizationDeallocLoweringPattern (
@@ -141,14 +122,6 @@ func::FuncOp buildDeallocationLibraryFunction(OpBuilder &builder, Location loc,
141122LogicalResult deallocateBuffersOwnershipBased (FunctionOpInterface op,
142123 DeallocationOptions options);
143124
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-
152125// Options struct for BufferResultsToOutParams pass.
153126// Note: defined only here, not in tablegen.
154127struct BufferResultsToOutParamsOpts {
@@ -192,51 +165,20 @@ struct BufferResultsToOutParamsOpts {
192165 bool hoistStaticAllocs = false ;
193166};
194167
195- // / Creates a pass that converts memref function results to out-params.
196- std::unique_ptr<Pass> createBufferResultsToOutParamsPass (
197- const BufferResultsToOutParamsOpts &options = {});
198-
199168// / Replace buffers that are returned from a function with an out parameter.
200169// / Also update all call sites.
201170LogicalResult
202171promoteBufferResultsToOutParams (ModuleOp module ,
203172 const BufferResultsToOutParamsOpts &options);
204173
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-
212174// / Drop all memref function results that are equivalent to a function argument.
213175LogicalResult dropEquivalentBufferResults (ModuleOp module );
214176
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-
231177// / Creates a pass that promotes heap-based allocations to stack-based ones.
232178// / Only buffers smaller with `isSmallAlloc(alloc) == true` are promoted.
233179std::unique_ptr<Pass>
234180createPromoteBuffersToStackPass (std::function<bool (Value)> isSmallAlloc);
235181
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-
240182// ===----------------------------------------------------------------------===//
241183// Registration
242184// ===----------------------------------------------------------------------===//
0 commit comments