MLIR
20.0.0git
|
An is-same-buffer analysis that checks if two SSA values belong to the same buffer allocation or not. More...
#include "mlir/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.h"
Public Member Functions | |
BufferOriginAnalysis (Operation *op) | |
std::optional< bool > | isSameAllocation (Value v1, Value v2) |
Return "true" if v1 and v2 originate from the same buffer allocation. More... | |
An is-same-buffer analysis that checks if two SSA values belong to the same buffer allocation or not.
Definition at line 85 of file BufferViewFlowAnalysis.h.
BufferOriginAnalysis::BufferOriginAnalysis | ( | Operation * | op | ) |
Definition at line 240 of file BufferViewFlowAnalysis.cpp.
Return "true" if v1
and v2
originate from the same buffer allocation.
Return "false" if v1
and v2
originate from different allocations. Return "nullopt" if we do not know for sure.
Example 1: isSameAllocation(%0, %1) == true
Example 2: isSameAllocation(%0, %1) == false
Example 3: isSameAllocation(%0, %2) == nullopt
Definition at line 242 of file BufferViewFlowAnalysis.cpp.
References mlir::Value::getType(), getViewBase(), hasAllocateSideEffect(), isFunctionArgument(), mlir::BufferViewFlowAnalysis::mayBeTerminalBuffer(), and mlir::BufferViewFlowAnalysis::resolveReverse().
Referenced by potentiallyAliasesMemref().