24 #define GEN_PASS_DEF_LINALGBUFFERIZE
25 #include "mlir/Dialect/Linalg/Passes.h.inc"
29 using namespace bufferization;
34 struct LinalgBufferizePass
35 :
public impl::LinalgBufferizeBase<LinalgBufferizePass> {
36 void runOnOperation()
override {
38 options.opFilter.allowDialect<linalg::LinalgDialect>();
45 registry.
insert<bufferization::BufferizationDialect, memref::MemRefDialect,
46 tensor::TensorDialect, linalg::LinalgDialect>();
53 return std::make_unique<LinalgBufferizePass>();
static llvm::ManagedStatic< PassManagerOptions > options
The DialectRegistry maps a dialect namespace to a constructor for the matching dialect.
LogicalResult bufferizeOp(Operation *op, const BufferizationOptions &options, BufferizationStatistics *statistics=nullptr)
Bufferize op and its nested ops that implement BufferizableOpInterface.
BufferizationOptions getPartialBufferizationOptions()
Return BufferizationOptions such that the bufferizeOp behaves like the old (deprecated) partial,...
void registerBufferizableOpInterfaceExternalModels(DialectRegistry ®istry)
Include the generated interface declarations.
std::unique_ptr< Pass > createLinalgBufferizePass()
Create a pass to convert Linalg operations which work on tensors to use buffers instead.
bool failed(LogicalResult result)
Utility function that returns true if the provided LogicalResult corresponds to a failure value.
Options for BufferizableOpInterface-based bufferization.