22 const BufferizationState &bufferizationState,
28 if (
options.bufferizeFunctionBoundaries) {
32 if (failed(
analyzeOp(op, analysisState, statistics)))
44 const BufferizationState &bufferizationState) {
58 analysisState.getOptions().dynCastBufferizableOp(nestedOp);
65 if (failed(bufferizableOp.resolveConflicts(rewriter, analysisState,
72 return failure(
result.wasInterrupted());
static llvm::ManagedStatic< PassManagerOptions > options
Base class for generic analysis states.
This class coordinates rewriting a piece of IR outside of a pattern rewrite, providing a way to keep ...
void setInsertionPoint(Block *block, Block::iterator insertPoint)
Set the insertion point to the specified location.
A trait used to provide symbol table functionalities to a region operation.
Operation is the basic unit of execution within MLIR.
bool hasTrait()
Returns true if the operation was registered with a particular trait, e.g.
Operation * getParentWithTrait()
Returns the closest surrounding parent operation with trait Trait.
std::enable_if_t< llvm::function_traits< std::decay_t< FnT > >::num_args==1, RetT > walk(FnT &&callback)
Walk the operation by calling the callback for each nested operation (including this one),...
MLIRContext * getContext()
Return the context this operation is associated with.
A utility result that is used to signal how to proceed with an ongoing walk:
static WalkResult advance()
static WalkResult interrupt()
State for analysis-enabled bufferization.
LogicalResult analyzeOp(Operation *op, OneShotAnalysisState &state, BufferizationStatistics *statistics=nullptr)
Analyze op and its nested 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.
llvm::LogicalResult analyzeModuleOp(Operation *moduleOp, OneShotAnalysisState &state, BufferizationStatistics *statistics=nullptr)
Analyze moduleOp and its nested ops.
Include the generated interface declarations.
Bufferization statistics for debugging.
Options for analysis-enabled bufferization.