MLIR  20.0.0git
Classes | Enumerations | Functions
mlir::bufferization::func_ext Namespace Reference

Classes

struct  FuncAnalysisState
 Extra analysis state that is required for bufferization of function boundaries. More...
 
struct  CallOpInterface
 
struct  ReturnOpInterface
 
struct  FuncOpInterface
 

Enumerations

enum class  FuncOpAnalysisState { NotAnalyzed , InProgress , Analyzed }
 The state of analysis of a FuncOp. More...
 

Functions

void registerBufferizableOpInterfaceExternalModels (DialectRegistry &registry)
 
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 FuncAnalysisStategetFuncAnalysisState (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 std::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...
 

Enumeration Type Documentation

◆ FuncOpAnalysisState

The state of analysis of a FuncOp.

Enumerator
NotAnalyzed 
InProgress 
Analyzed 

Definition at line 30 of file FuncBufferizableOpInterfaceImpl.h.

Function Documentation

◆ getBufferizedFunctionArgType()

static BaseMemRefType mlir::bufferization::func_ext::getBufferizedFunctionArgType ( FuncOp  funcOp,
int64_t  index,
const BufferizationOptions options 
)
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 (as per options.functionArgTypeConverterFn).

Definition at line 57 of file FuncBufferizableOpInterfaceImpl.cpp.

References mlir::get(), and options.

Referenced by mlir::bufferization::func_ext::FuncOpInterface::bufferize(), and mlir::bufferization::func_ext::FuncOpInterface::getBufferType().

◆ getCalledFunction()

static FuncOp mlir::bufferization::func_ext::getCalledFunction ( CallOpInterface  callOp)
static

◆ getEquivalentFuncArgIdx()

static std::optional<int64_t> mlir::bufferization::func_ext::getEquivalentFuncArgIdx ( FuncOp  funcOp,
const FuncAnalysisState state,
int64_t  returnValIdx 
)
static

Return the index of the bbArg in the given FuncOp that is equivalent to the specified return value (if any).

Definition at line 117 of file FuncBufferizableOpInterfaceImpl.cpp.

◆ getFuncAnalysisState()

static const FuncAnalysisState& mlir::bufferization::func_ext::getFuncAnalysisState ( const AnalysisState state)
static

Get FuncAnalysisState.

Definition at line 90 of file FuncBufferizableOpInterfaceImpl.cpp.

◆ getFuncOpAnalysisState()

static FuncOpAnalysisState mlir::bufferization::func_ext::getFuncOpAnalysisState ( const AnalysisState state,
FuncOp  funcOp 
)
static

Return the state (phase) of analysis of the FuncOp.

Definition at line 99 of file FuncBufferizableOpInterfaceImpl.cpp.

◆ registerBufferizableOpInterfaceExternalModels()

void mlir::bufferization::func_ext::registerBufferizableOpInterfaceExternalModels ( DialectRegistry registry)