MLIR
16.0.0git
|
Classes | |
struct | CallOpInterface |
struct | FuncAnalysisState |
Extra analysis state that is required for bufferization of function boundaries. More... | |
struct | FuncOpInterface |
struct | ReturnOpInterface |
Enumerations | |
enum | FuncOpAnalysisState { FuncOpAnalysisState::NotAnalyzed, FuncOpAnalysisState::InProgress, FuncOpAnalysisState::Analyzed } |
The state of analysis of a FuncOp. More... | |
Functions | |
void | registerBufferizableOpInterfaceExternalModels (DialectRegistry ®istry) |
static func::ReturnOp | getAssumedUniqueReturnOp (FuncOp funcOp) |
Return the unique ReturnOp that terminates funcOp . More... | |
static BaseMemRefType | getBufferizedFunctionArgType (FuncOp funcOp, int64_t index, const BufferizationOptions &options) |
Return the index-th bufferized function argument type. More... | |
static FuncOp | getCalledFunction (CallOpInterface callOp) |
Return the FuncOp called by callOp . More... | |
static const FuncAnalysisState & | getFuncAnalysisState (const AnalysisState &state) |
Get FuncAnalysisState. More... | |
static FuncOpAnalysisState | getFuncOpAnalysisState (const AnalysisState &state, FuncOp funcOp) |
Return the state (phase) of analysis of the FuncOp. More... | |
static Optional< int64_t > | getEquivalentFuncArgIdx (FuncOp funcOp, const FuncAnalysisState &state, int64_t returnValIdx) |
Return the index of the bbArg in the given FuncOp that is equivalent to the specified return value (if any). More... | |
The state of analysis of a FuncOp.
Enumerator | |
---|---|
NotAnalyzed | |
InProgress | |
Analyzed |
Definition at line 24 of file FuncBufferizableOpInterfaceImpl.h.
|
static |
Return the unique ReturnOp that terminates funcOp
.
Return nullptr if there is no such unique ReturnOp.
Definition at line 47 of file FuncBufferizableOpInterfaceImpl.cpp.
Referenced by mlir::bufferization::func_ext::FuncOpInterface::bufferize(), foldMemRefCasts(), and getAssumedUniqueReturnOp().
|
static |
Return the index-th bufferized function argument type.
This assumes that the specified argument is a tensor. If the tensor is ranked, a layout map may be specified by the user. If no layout map is specified, the default layout map (as per options.functionBoundaryTypeConversion
) is used.
Definition at line 64 of file FuncBufferizableOpInterfaceImpl.cpp.
References mlir::Type::dyn_cast(), mlir::bufferization::BufferizationOptions::functionBoundaryTypeConversion, mlir::bufferization::getMemRefTypeWithFullyDynamicLayout(), mlir::bufferization::getMemRefTypeWithStaticIdentityLayout(), and mlir::bufferization::BufferizationOptions::IdentityLayoutMap.
Referenced by mlir::bufferization::func_ext::FuncOpInterface::bufferize().
|
static |
Return the FuncOp called by callOp
.
Definition at line 93 of file FuncBufferizableOpInterfaceImpl.cpp.
References mlir::SymbolTable::lookupNearestSymbolFrom().
Referenced by mlir::bufferization::func_ext::CallOpInterface::bufferize(), mlir::bufferization::func_ext::CallOpInterface::bufferizesToMemoryRead(), mlir::bufferization::func_ext::CallOpInterface::bufferizesToMemoryWrite(), mlir::bufferization::func_ext::CallOpInterface::bufferRelation(), equivalenceAnalysis(), mlir::bufferization::func_ext::CallOpInterface::getAliasingOpOperand(), and mlir::bufferization::func_ext::CallOpInterface::getAliasingOpResult().
|
static |
Return the index of the bbArg in the given FuncOp that is equivalent to the specified return value (if any).
Definition at line 128 of file FuncBufferizableOpInterfaceImpl.cpp.
References mlir::bufferization::func_ext::FuncAnalysisState::equivalentFuncArgs, and None.
Referenced by mlir::bufferization::func_ext::CallOpInterface::bufferRelation().
|
static |
Get FuncAnalysisState.
Definition at line 103 of file FuncBufferizableOpInterfaceImpl.cpp.
References mlir::bufferization::AnalysisState::getDialectState().
Referenced by mlir::bufferization::analyzeModuleOp(), mlir::bufferization::func_ext::CallOpInterface::bufferizesToMemoryRead(), mlir::bufferization::func_ext::CallOpInterface::bufferizesToMemoryWrite(), mlir::bufferization::func_ext::CallOpInterface::bufferRelation(), equivalenceAnalysis(), mlir::bufferization::func_ext::CallOpInterface::getAliasingOpOperand(), mlir::bufferization::func_ext::CallOpInterface::getAliasingOpResult(), getAssumedUniqueReturnOp(), and getFuncOpAnalysisState().
|
static |
Return the state (phase) of analysis of the FuncOp.
Definition at line 112 of file FuncBufferizableOpInterfaceImpl.cpp.
References mlir::bufferization::func_ext::FuncAnalysisState::analyzedFuncOps, mlir::bufferization::AnalysisState::getDialectState(), and NotAnalyzed.
Referenced by mlir::bufferization::func_ext::CallOpInterface::bufferizesToMemoryRead(), mlir::bufferization::func_ext::CallOpInterface::bufferizesToMemoryWrite(), mlir::bufferization::func_ext::CallOpInterface::bufferRelation(), mlir::bufferization::func_ext::CallOpInterface::getAliasingOpOperand(), and mlir::bufferization::func_ext::CallOpInterface::getAliasingOpResult().
void mlir::bufferization::func_ext::registerBufferizableOpInterfaceExternalModels | ( | DialectRegistry & | registry | ) |
Definition at line 518 of file FuncBufferizableOpInterfaceImpl.cpp.
References mlir::DialectRegistry::addExtension().
Referenced by mlir::bufferization::func_ext::FuncOpInterface::isWritable(), and mlir::registerAllDialects().