MLIR  16.0.0git
Public Types | Public Member Functions | Public Attributes | List of all members
mlir::bufferization::func_ext::FuncAnalysisState Struct Reference

Extra analysis state that is required for bufferization of function boundaries. More...

#include "mlir/Dialect/Bufferization/Transforms/FuncBufferizableOpInterfaceImpl.h"

+ Inheritance diagram for mlir::bufferization::func_ext::FuncAnalysisState:
+ Collaboration diagram for mlir::bufferization::func_ext::FuncAnalysisState:

Public Types

using BbArgIndexSet = DenseSet< int64_t >
 A set of block argument indices. More...
 
using IndexMapping = DenseMap< int64_t, int64_t >
 A mapping of indices to indices. More...
 
using IndexToIndexListMapping = DenseMap< int64_t, SmallVector< int64_t > >
 A mapping of indices to a list of indices. More...
 

Public Member Functions

void startFunctionAnalysis (FuncOp funcOp)
 This function is called right before analyzing the given FuncOp. More...
 
- Public Member Functions inherited from mlir::bufferization::DialectAnalysisState
 DialectAnalysisState ()=default
 
virtual ~DialectAnalysisState ()=default
 
 DialectAnalysisState (const DialectAnalysisState &)=delete
 

Public Attributes

DenseMap< FuncOp, IndexMappingequivalentFuncArgs
 A mapping of ReturnOp OpOperand indices to equivalent FuncOp BBArg indices. More...
 
DenseMap< FuncOp, IndexToIndexListMappingaliasingFuncArgs
 A mapping of ReturnOp OpOperand indices to aliasing FuncOp BBArg indices. More...
 
DenseMap< FuncOp, IndexToIndexListMappingaliasingReturnVals
 A mapping of FuncOp BBArg indices to aliasing ReturnOp OpOperand indices. More...
 
DenseMap< FuncOp, BbArgIndexSetreadBbArgs
 A set of all read BlockArguments of FuncOps. More...
 
DenseMap< FuncOp, BbArgIndexSetwrittenBbArgs
 A set of all written-to BlockArguments of FuncOps. More...
 
DenseMap< FuncOp, FuncOpAnalysisStateanalyzedFuncOps
 Keep track of which FuncOps are fully analyzed or currently being analyzed. More...
 

Detailed Description

Extra analysis state that is required for bufferization of function boundaries.

Definition at line 30 of file FuncBufferizableOpInterfaceImpl.h.

Member Typedef Documentation

◆ BbArgIndexSet

A set of block argument indices.

Definition at line 38 of file FuncBufferizableOpInterfaceImpl.h.

◆ IndexMapping

A mapping of indices to indices.

Definition at line 41 of file FuncBufferizableOpInterfaceImpl.h.

◆ IndexToIndexListMapping

A mapping of indices to a list of indices.

Definition at line 44 of file FuncBufferizableOpInterfaceImpl.h.

Member Function Documentation

◆ startFunctionAnalysis()

void mlir::bufferization::func_ext::FuncAnalysisState::startFunctionAnalysis ( FuncOp  funcOp)

This function is called right before analyzing the given FuncOp.

It initializes the data structures for the FuncOp in this state object.

Definition at line 22 of file FuncBufferizableOpInterfaceImpl.cpp.

References aliasingFuncArgs, aliasingReturnVals, analyzedFuncOps, equivalentFuncArgs, mlir::bufferization::func_ext::InProgress, readBbArgs, and writtenBbArgs.

Referenced by mlir::bufferization::analyzeModuleOp().

Member Data Documentation

◆ aliasingFuncArgs

DenseMap<FuncOp, IndexToIndexListMapping> mlir::bufferization::func_ext::FuncAnalysisState::aliasingFuncArgs

A mapping of ReturnOp OpOperand indices to aliasing FuncOp BBArg indices.

Definition at line 51 of file FuncBufferizableOpInterfaceImpl.h.

Referenced by mlir::bufferization::func_ext::CallOpInterface::getAliasingOpOperand(), getAssumedUniqueReturnOp(), and startFunctionAnalysis().

◆ aliasingReturnVals

DenseMap<FuncOp, IndexToIndexListMapping> mlir::bufferization::func_ext::FuncAnalysisState::aliasingReturnVals

A mapping of FuncOp BBArg indices to aliasing ReturnOp OpOperand indices.

Definition at line 54 of file FuncBufferizableOpInterfaceImpl.h.

Referenced by mlir::bufferization::func_ext::CallOpInterface::getAliasingOpResult(), getAssumedUniqueReturnOp(), and startFunctionAnalysis().

◆ analyzedFuncOps

DenseMap<FuncOp, FuncOpAnalysisState> mlir::bufferization::func_ext::FuncAnalysisState::analyzedFuncOps

Keep track of which FuncOps are fully analyzed or currently being analyzed.

Definition at line 64 of file FuncBufferizableOpInterfaceImpl.h.

Referenced by mlir::bufferization::analyzeModuleOp(), getFuncOpAnalysisState(), mlir::bufferization::func_ext::getFuncOpAnalysisState(), and startFunctionAnalysis().

◆ equivalentFuncArgs

DenseMap<FuncOp, IndexMapping> mlir::bufferization::func_ext::FuncAnalysisState::equivalentFuncArgs

A mapping of ReturnOp OpOperand indices to equivalent FuncOp BBArg indices.

Definition at line 48 of file FuncBufferizableOpInterfaceImpl.h.

Referenced by equivalenceAnalysis(), getAssumedUniqueReturnOp(), mlir::bufferization::func_ext::getEquivalentFuncArgIdx(), and startFunctionAnalysis().

◆ readBbArgs

DenseMap<FuncOp, BbArgIndexSet> mlir::bufferization::func_ext::FuncAnalysisState::readBbArgs

◆ writtenBbArgs

DenseMap<FuncOp, BbArgIndexSet> mlir::bufferization::func_ext::FuncAnalysisState::writtenBbArgs

A set of all written-to BlockArguments of FuncOps.

Definition at line 60 of file FuncBufferizableOpInterfaceImpl.h.

Referenced by mlir::bufferization::func_ext::CallOpInterface::bufferizesToMemoryWrite(), getAssumedUniqueReturnOp(), and startFunctionAnalysis().


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