MLIR  16.0.0git
Public Member Functions | List of all members
mlir::bufferization::func_ext::FuncOpInterface Struct Reference
+ Inheritance diagram for mlir::bufferization::func_ext::FuncOpInterface:
+ Collaboration diagram for mlir::bufferization::func_ext::FuncOpInterface:

Public Member Functions

LogicalResult bufferize (Operation *op, RewriterBase &rewriter, const BufferizationOptions &options) const
 Rewrite function bbArgs and return values into buffer form. More...
 
bool isWritable (Operation *op, Value value, const AnalysisState &state) const
 Return true if the given function argument is writable. More...
 

Detailed Description

Definition at line 383 of file FuncBufferizableOpInterfaceImpl.cpp.

Member Function Documentation

◆ bufferize()

LogicalResult mlir::bufferization::func_ext::FuncOpInterface::bufferize ( Operation op,
RewriterBase rewriter,
const BufferizationOptions options 
) const
inline

Rewrite function bbArgs and return values into buffer form.

This function bufferizes the function signature and the ReturnOp. When the entire function body has been bufferized, function return types can be switched to more concise memref types as part of foldMemRefCasts.

All function bbArgs are writable unless they are explicitly marked as read-only. Callers must insert copies when needed.

Definition at line 392 of file FuncBufferizableOpInterfaceImpl.cpp.

References mlir::OpBuilder::create(), mlir::Type::dyn_cast(), mlir::detail::enumerate(), mlir::Block::front(), mlir::bufferization::BufferizationOptions::functionBoundaryTypeConversion, mlir::Block::getArguments(), mlir::bufferization::func_ext::getAssumedUniqueReturnOp(), mlir::bufferization::func_ext::getBufferizedFunctionArgType(), mlir::Operation::getContext(), mlir::bufferization::getMemRefTypeWithFullyDynamicLayout(), mlir::bufferization::getMemRefTypeWithStaticIdentityLayout(), mlir::Value::getType(), mlir::ValueRange::getTypes(), mlir::bufferization::BufferizationOptions::IdentityLayoutMap, options, mlir::OpBuilder::setInsertionPoint(), mlir::OpBuilder::setInsertionPointToStart(), and mlir::success().

◆ isWritable()

bool mlir::bufferization::func_ext::FuncOpInterface::isWritable ( Operation op,
Value  value,
const AnalysisState state 
) const
inline

Return true if the given function argument is writable.

Definition at line 496 of file FuncBufferizableOpInterfaceImpl.cpp.

References mlir::Value::dyn_cast(), and mlir::bufferization::func_ext::registerBufferizableOpInterfaceExternalModels().


The documentation for this struct was generated from the following file: