MLIR
15.0.0git
|
The BufferizationAliasInfo class maintains a list of buffer aliases and equivalence classes to support bufferization. More...
#include "mlir/Dialect/Bufferization/Transforms/OneShotAnalysis.h"
Public Member Functions | |
BufferizationAliasInfo (Operation *rootOp) | |
BufferizationAliasInfo (const BufferizationAliasInfo &)=delete | |
void | createAliasInfoEntry (Value v) |
Add a new entry for v in the aliasInfo and equivalentInfo . More... | |
void | insertNewBufferAlias (Value newValue, Value alias) |
Insert an info entry for newValue and merge its alias set with that of alias . More... | |
void | insertNewBufferEquivalence (Value newValue, Value alias) |
Insert an info entry for newValue and merge its alias set with that of alias . More... | |
void | bufferizeInPlace (OpOperand &operand, AnalysisState &state) |
Set the inPlace bufferization spec to true. More... | |
void | bufferizeOutOfPlace (OpOperand &operand) |
Set the inPlace bufferization spec to false. More... | |
bool | areAliasingBufferizedValues (Value v1, Value v2) const |
Return true if v1 and v2 may bufferize to aliasing buffers. More... | |
bool | areEquivalentBufferizedValues (Value v1, Value v2) const |
Return true if v1 and v2 bufferize to equivalent buffers. More... | |
void | unionAliasSets (Value v1, Value v2) |
Union the alias sets of v1 and v2 . More... | |
void | unionEquivalenceClasses (Value v1, Value v2) |
Union the equivalence classes of v1 and v2 . More... | |
void | applyOnEquivalenceClass (Value v, function_ref< void(Value)> fun) const |
Apply fun to all the members of the equivalence class of v . More... | |
void | applyOnAliases (Value v, function_ref< void(Value)> fun) const |
Apply fun to all aliases of v . More... | |
void | markInPlace (OpOperand &o) |
Mark a value as in-place bufferized. More... | |
bool | isInPlace (OpOperand &opOperand) const |
Return true if a value was marked as in-place bufferized. More... | |
The BufferizationAliasInfo class maintains a list of buffer aliases and equivalence classes to support bufferization.
Definition at line 58 of file OneShotAnalysis.h.
|
explicit |
Definition at line 100 of file OneShotAnalysis.cpp.
References createAliasInfoEntry(), mlir::Operation::getRegions(), mlir::Operation::getResults(), and mlir::Operation::walk().
|
delete |
void BufferizationAliasInfo::applyOnAliases | ( | Value | v, |
function_ref< void(Value)> | fun | ||
) | const |
Apply fun
to all aliases of v
.
Definition at line 165 of file OneShotAnalysis.cpp.
Referenced by aliasesInPlaceWrite(), aliasesNonWritableBuffer(), mlir::bufferization::OneShotAnalysisState::gatherYieldedTensors(), and getAssumedUniqueReturnOp().
void BufferizationAliasInfo::applyOnEquivalenceClass | ( | Value | v, |
function_ref< void(Value)> | fun | ||
) | const |
Apply fun
to all the members of the equivalence class of v
.
Definition at line 155 of file OneShotAnalysis.cpp.
Referenced by assertDestinationPassingStyle().
|
inline |
Return true if v1
and v2
may bufferize to aliasing buffers.
Definition at line 85 of file OneShotAnalysis.h.
Referenced by getAssumedUniqueReturnOp().
|
inline |
Return true if v1
and v2
bufferize to equivalent buffers.
Definition at line 90 of file OneShotAnalysis.h.
Referenced by mlir::bufferization::OneShotAnalysisState::areEquivalentBufferizedValues(), and getAssumedUniqueReturnOp().
void BufferizationAliasInfo::bufferizeInPlace | ( | OpOperand & | operand, |
AnalysisState & | state | ||
) |
Set the inPlace bufferization spec to true.
Merge result's and operand's aliasing sets and iterate to a fixed point.
Definition at line 141 of file OneShotAnalysis.cpp.
References mlir::IROperand< DerivedT, IRValueT >::get(), mlir::bufferization::AnalysisState::getAliasingOpResult(), and markInPlace().
Referenced by bufferizableInPlaceAnalysisImpl().
Set the inPlace bufferization spec to false.
Definition at line 149 of file OneShotAnalysis.cpp.
Referenced by bufferizableInPlaceAnalysisImpl().
Add a new entry for v
in the aliasInfo
and equivalentInfo
.
In the beginning the alias and equivalence sets only contain v
itself.
Definition at line 115 of file OneShotAnalysis.cpp.
Referenced by BufferizationAliasInfo(), and insertNewBufferAlias().
Insert an info entry for newValue
and merge its alias set with that of alias
.
Definition at line 122 of file OneShotAnalysis.cpp.
References createAliasInfoEntry().
Referenced by insertNewBufferEquivalence().
Insert an info entry for newValue
and merge its alias set with that of alias
.
Additionally, merge their equivalence classes.
Definition at line 129 of file OneShotAnalysis.cpp.
References insertNewBufferAlias().
bool BufferizationAliasInfo::isInPlace | ( | OpOperand & | opOperand | ) | const |
Return true
if a value was marked as in-place bufferized.
Definition at line 136 of file OneShotAnalysis.cpp.
Referenced by annotateOpsWithBufferizationMarkers(), mlir::bufferization::OneShotAnalysisState::isInPlace(), and isInplaceMemoryWrite().
Mark a value as in-place bufferized.
Definition at line 109 of file OneShotAnalysis.h.
References isInPlace().
Referenced by bufferizeInPlace(), and mlir::bufferization::OneShotAnalysisState::OneShotAnalysisState().
Union the alias sets of v1
and v2
.
Definition at line 95 of file OneShotAnalysis.h.
Referenced by mlir::bufferization::OneShotAnalysisState::OneShotAnalysisState().
|
inline |
Union the equivalence classes of v1
and v2
.
Definition at line 98 of file OneShotAnalysis.h.
Referenced by equivalenceAnalysis().