9#ifndef MLIR_DIALECT_BUFFERIZATION_TRANSFORMS_TRANSFORMS_H
10#define MLIR_DIALECT_BUFFERIZATION_TRANSFORMS_TRANSFORMS_H
49 tensor::EmptyOp emptyTensorOp,
Operation *user)>;
57 SubsetInsertionOpInterface op,
58 tensor::EmptyOp emptyTensorOp,
Operation *user);
78 const BufferizationState &bufferizationState,
86 const BufferizationState &bufferizationState);
static llvm::ManagedStatic< PassManagerOptions > options
Base class for generic analysis states.
Operation is the basic unit of execution within MLIR.
This class coordinates the application of a rewrite on a set of IR, providing a way for clients to tr...
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
State for analysis-enabled bufferization.
void hoistBuffersFromLoops(Operation *op)
Within the given operation, hoist buffers from loops where possible.
void populateEmptyTensorToAllocTensorPattern(RewritePatternSet &patterns)
Populate patterns to lower tensor.empty ops to bufferization.alloc_tensor ops.
LogicalResult insertTensorCopies(Operation *op, const OneShotBufferizationOptions &options, const BufferizationState &bufferizationState, BufferizationStatistics *statistics=nullptr)
Resolve RaW and other conflicts by inserting bufferization.alloc_tensor ops.
std::function< Value(RewriterBase &, SubsetInsertionOpInterface, tensor::EmptyOp emptyTensorOp, Operation *user)> ControlBuildSubsetExtractionFn
A function type that defines a callback to control the construction of the subset extraction of the S...
Value buildSubsetExtraction(RewriterBase &rewriter, SubsetInsertionOpInterface op, tensor::EmptyOp emptyTensorOp, Operation *user)
This method builds and returns a subset extraction value for the destination tensor that the given op...
LogicalResult eliminateEmptyTensors(RewriterBase &rewriter, Operation *op)
Try to eliminate "tensor.empty" ops inside op.
Include the generated interface declarations.
const FrozenRewritePatternSet & patterns
Bufferization statistics for debugging.
Options for analysis-enabled bufferization.