1 #ifndef MLIR_DIALECT_BUFFERIZATION_TRANSFORMS_PASSES_H 2 #define MLIR_DIALECT_BUFFERIZATION_TRANSFORMS_PASSES_H 13 namespace bufferization {
14 struct OneShotBufferizationOptions;
67 unsigned maxRankOfAllocatedMemRef = 1);
94 #define GEN_PASS_REGISTRATION 95 #include "mlir/Dialect/Bufferization/Transforms/Passes.h.inc" 100 #endif // MLIR_DIALECT_BUFFERIZATION_TRANSFORMS_PASSES_H Include the generated interface declarations.
LogicalResult dropEquivalentBufferResults(ModuleOp module)
Drop all memref function results that are equivalent to a function argument.
std::unique_ptr< Pass > createTensorCopyInsertionPass(const OneShotBufferizationOptions &options)
std::unique_ptr< Pass > createPromoteBuffersToStackPass(std::function< bool(Value)> isSmallAlloc)
Creates a pass that promotes heap-based allocations to stack-based ones.
LogicalResult promoteBufferResultsToOutParams(ModuleOp module)
Replace buffers that are returned from a function with an out parameter.
std::unique_ptr< Pass > createBufferDeallocationPass()
Creates an instance of the BufferDeallocation pass to free all allocated buffers. ...
void registerAllocationOpInterfaceExternalModels(DialectRegistry ®istry)
Register external models for AllocationOpInterface.
LogicalResult deallocateBuffers(Operation *op)
Run buffer deallocation.
std::unique_ptr< Pass > createDropEquivalentBufferResultsPass()
Creates a pass that drops memref function results that are equivalent to a function argument...
std::unique_ptr< Pass > createBufferResultsToOutParamsPass()
Creates a pass that converts memref function results to out-params.
std::unique_ptr< Pass > createBufferHoistingPass()
Creates a pass that moves allocations upwards to reduce the number of required copies that are insert...
std::unique_ptr< Pass > createBufferizationBufferizePass()
Create a pass that bufferizes ops from the bufferization dialect.
std::unique_ptr< Pass > createBufferLoopHoistingPass()
Creates a pass that moves allocations upwards out of loops.
static llvm::ManagedStatic< PassManagerOptions > options
std::unique_ptr< OperationPass< func::FuncOp > > createFinalizingBufferizePass()
Creates a pass that finalizes a partial bufferization by removing remaining bufferization.to_tensor and bufferization.to_memref operations.
std::unique_ptr< Pass > createOneShotBufferizePass(const OneShotBufferizationOptions &options)
Create a pass that bufferizes all ops that implement BufferizableOpInterface with One-Shot Bufferize ...
std::unique_ptr< Pass > createAllocTensorEliminationPass()
Create a pass that tries to eliminate alloc_tensor ops that are anchored on insert_slice ops...