9 #ifndef MLIR_DIALECT_BUFFERIZATION_TRANSFORMS_TRANSFORMS_H
10 #define MLIR_DIALECT_BUFFERIZATION_TRANSFORMS_TRANSFORMS_H
18 namespace bufferization {
20 struct BufferizationStatistics;
21 class OneShotAnalysisState;
22 struct OneShotBufferizationOptions;
49 tensor::EmptyOp emptyTensorOp,
Operation *user)>;
57 SubsetInsertionOpInterface op,
58 tensor::EmptyOp emptyTensorOp,
Operation *user);
static llvm::ManagedStatic< PassManagerOptions > options
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...
AnalysisState provides a variety of helper functions for dealing with tensor values.
State for analysis-enabled bufferization.
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...
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, BufferizationStatistics *statistics=nullptr)
Resolve RaW and other conflicts by inserting bufferization.alloc_tensor ops.
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.