MLIR
18.0.0git
|
An AffineValueMap is an affine map plus its ML value operands and results for analysis purposes. More...
#include "mlir/Dialect/Affine/IR/AffineValueMap.h"
Public Member Functions | |
AffineValueMap ()=default | |
AffineValueMap (AffineMap map, ValueRange operands, ValueRange results={}) | |
~AffineValueMap () | |
void | reset (AffineMap map, ValueRange operands, ValueRange results={}) |
bool | isMultipleOf (unsigned idx, int64_t factor) const |
Return true if the idx^th result can be proved to be a multiple of 'factor', false otherwise. More... | |
bool | isFunctionOf (unsigned idx, Value value) const |
Return true if the idx^th result depends on 'value', false otherwise. More... | |
bool | isConstant (unsigned idx) const |
Return true if the result at 'idx' is a constant, false otherwise. More... | |
bool | isIdentity () const |
Return true if this is an identity map. More... | |
void | setResult (unsigned i, AffineExpr e) |
AffineExpr | getResult (unsigned i) |
unsigned | getNumOperands () const |
unsigned | getNumDims () const |
unsigned | getNumSymbols () const |
unsigned | getNumResults () const |
Value | getOperand (unsigned i) const |
ArrayRef< Value > | getOperands () const |
AffineMap | getAffineMap () const |
LogicalResult | canonicalize () |
Attempts to canonicalize the map and operands. More... | |
Static Public Member Functions | |
static void | difference (const AffineValueMap &a, const AffineValueMap &b, AffineValueMap *res) |
Return the value map that is the difference of value maps 'a' and 'b', represented as an affine map and its operands. More... | |
An AffineValueMap is an affine map plus its ML value operands and results for analysis purposes.
The structure is still a tree form that is same as that of an affine map or an AffineApplyOp. However, its operands, results, and its map can themselves change as a result of substitutions, simplifications, and other analysis.
Definition at line 35 of file AffineValueMap.h.
|
default |
AffineValueMap::AffineValueMap | ( | AffineMap | map, |
ValueRange | operands, | ||
ValueRange | results = {} |
||
) |
Definition at line 15 of file AffineValueMap.cpp.
|
default |
LogicalResult AffineValueMap::canonicalize | ( | ) |
Attempts to canonicalize the map and operands.
Return success if the map and/or operands have been modified.
Definition at line 3924 of file AffineOps.cpp.
References composeAffineMapAndOperands(), mlir::failure(), and mlir::success().
|
static |
Return the value map that is the difference of value maps 'a' and 'b', represented as an affine map and its operands.
The output map + operands are canonicalized and simplified.
Definition at line 27 of file AffineValueMap.cpp.
References mlir::affine::canonicalizeMapAndOperands(), mlir::affine::fullyComposeAffineMapAndOperands(), mlir::AffineMap::get(), getAffineMap(), getNumDims(), getNumOperands(), getNumResults(), getNumSymbols(), getOperands(), reset(), mlir::AffineMap::shiftDims(), mlir::AffineMap::shiftSymbols(), and mlir::simplifyAffineMap().
Referenced by mlir::affine::getTripCountMapAndOperands(), and mlir::affine::MemRefAccess::operator==().
AffineMap AffineValueMap::getAffineMap | ( | ) | const |
Definition at line 101 of file AffineValueMap.cpp.
References mlir::MutableAffineMap::getAffineMap().
Referenced by mlir::affine::FlatAffineValueConstraints::composeMap(), createFullTiles(), difference(), mlir::affine::getRelationFromMap(), mlir::affine::getTripCountMapAndOperands(), isFunctionOf(), and mlir::affine::MemRefAccess::operator==().
|
inline |
Definition at line 70 of file AffineValueMap.h.
References mlir::AffineMap::getNumDims().
Referenced by difference().
|
inline |
Definition at line 69 of file AffineValueMap.h.
Referenced by difference().
|
inline |
Definition at line 72 of file AffineValueMap.h.
References mlir::AffineMap::getNumResults().
Referenced by difference(), and mlir::affine::getTripCountMapAndOperands().
|
inline |
Definition at line 71 of file AffineValueMap.h.
References mlir::AffineMap::getNumSymbols().
Referenced by difference().
Value AffineValueMap::getOperand | ( | unsigned | i | ) | const |
Definition at line 93 of file AffineValueMap.cpp.
Referenced by mlir::affine::getRelationFromMap().
Definition at line 97 of file AffineValueMap.cpp.
Referenced by mlir::affine::FlatAffineValueConstraints::composeMap(), createFullTiles(), difference(), and mlir::affine::getTripCountMapAndOperands().
|
inline |
Definition at line 68 of file AffineValueMap.h.
References mlir::AffineMap::getResult().
Referenced by mlir::affine::getTripCountMapAndOperands().
bool mlir::affine::AffineValueMap::isConstant | ( | unsigned | idx | ) | const |
Return true if the result at 'idx' is a constant, false otherwise.
bool AffineValueMap::isFunctionOf | ( | unsigned | idx, |
Value | value | ||
) | const |
Return true if the idx^th result depends on 'value', false otherwise.
This method uses the invariant that operands are always positionally aligned with the AffineDimExpr in the underlying AffineMap.
Definition at line 82 of file AffineValueMap.cpp.
References findIndex(), getAffineMap(), mlir::AffineMap::getResult(), and mlir::AffineExpr::isFunctionOfDim().
bool mlir::affine::AffineValueMap::isIdentity | ( | ) | const |
Return true if this is an identity map.
|
inline |
Return true if the idx^th result can be proved to be a multiple of 'factor', false otherwise.
Definition at line 76 of file AffineValueMap.cpp.
References mlir::MutableAffineMap::isMultipleOf().
void AffineValueMap::reset | ( | AffineMap | map, |
ValueRange | operands, | ||
ValueRange | results = {} |
||
) |
Definition at line 20 of file AffineValueMap.cpp.
Referenced by difference(), mlir::affine::MemRefAccess::getAccessMap(), and mlir::affine::FlatAffineValueConstraints::getIneqAsAffineValueMap().
|
inline |
Definition at line 67 of file AffineValueMap.h.
Referenced by mlir::affine::getTripCountMapAndOperands().