|
MLIR 22.0.0git
|
Affine binary operation expression. More...
#include "mlir/IR/AffineExpr.h"
Public Types | |
| using | ImplType = detail::AffineBinaryOpExprStorage |
| Public Types inherited from mlir::AffineExpr | |
| using | ImplType = detail::AffineExprStorage |
Public Member Functions | |
| AffineBinaryOpExpr (AffineExpr::ImplType *ptr) | |
| AffineExpr | getLHS () const |
| AffineExpr | getRHS () const |
| Public Member Functions inherited from mlir::AffineExpr | |
| constexpr | AffineExpr () |
| AffineExpr (const ImplType *expr) | |
| bool | operator== (AffineExpr other) const |
| bool | operator!= (AffineExpr other) const |
| bool | operator== (int64_t v) const |
| bool | operator!= (int64_t v) const |
| operator bool () const | |
| bool | operator! () const |
| MLIRContext * | getContext () const |
| AffineExprKind | getKind () const |
| Return the classification for this type. | |
| void | print (raw_ostream &os) const |
| void | dump () const |
| bool | isSymbolicOrConstant () const |
| Returns true if this expression is made out of only symbols and constants, i.e., it does not involve dimensional identifiers. | |
| bool | isPureAffine () const |
| Returns true if this is a pure affine expression, i.e., multiplication, floordiv, ceildiv, and mod is only allowed w.r.t constants. | |
| int64_t | getLargestKnownDivisor () const |
| Returns the greatest known integral divisor of this affine expression. | |
| bool | isMultipleOf (int64_t factor) const |
| Return true if the affine expression is a multiple of 'factor'. | |
| bool | isFunctionOfDim (unsigned position) const |
| Return true if the affine expression involves AffineDimExpr position. | |
| bool | isFunctionOfSymbol (unsigned position) const |
| Return true if the affine expression involves AffineSymbolExpr position. | |
| template<typename FnT, typename RetT = detail::walkResultType<FnT>> | |
| RetT | walk (FnT &&callback) const |
| Walk all of the AffineExpr's in this expression in postorder. | |
| AffineExpr | replaceDimsAndSymbols (ArrayRef< AffineExpr > dimReplacements, ArrayRef< AffineExpr > symReplacements) const |
| This method substitutes any uses of dimensions and symbols (e.g. | |
| AffineExpr | replaceDims (ArrayRef< AffineExpr > dimReplacements) const |
| Dim-only version of replaceDimsAndSymbols. | |
| AffineExpr | replaceSymbols (ArrayRef< AffineExpr > symReplacements) const |
| Symbol-only version of replaceDimsAndSymbols. | |
| AffineExpr | replace (AffineExpr expr, AffineExpr replacement) const |
| Sparse replace method. | |
| AffineExpr | replace (const DenseMap< AffineExpr, AffineExpr > &map) const |
| Sparse replace method. | |
| AffineExpr | shiftDims (unsigned numDims, unsigned shift, unsigned offset=0) const |
| Replace dims[offset ... numDims) by dims[offset + shift ... shift + numDims). | |
| AffineExpr | shiftSymbols (unsigned numSymbols, unsigned shift, unsigned offset=0) const |
| Replace symbols[offset ... numSymbols) by symbols[offset + shift ... shift + numSymbols). | |
| AffineExpr | operator+ (int64_t v) const |
| AffineExpr | operator+ (AffineExpr other) const |
| AffineExpr | operator- () const |
| AffineExpr | operator- (int64_t v) const |
| AffineExpr | operator- (AffineExpr other) const |
| AffineExpr | operator* (int64_t v) const |
| AffineExpr | operator* (AffineExpr other) const |
| AffineExpr | floorDiv (uint64_t v) const |
| AffineExpr | floorDiv (AffineExpr other) const |
| AffineExpr | ceilDiv (uint64_t v) const |
| AffineExpr | ceilDiv (AffineExpr other) const |
| AffineExpr | operator% (uint64_t v) const |
| AffineExpr | operator% (AffineExpr other) const |
| AffineExpr | compose (AffineMap map) const |
| Compose with an AffineMap. | |
| friend::llvm::hash_code | hash_value (AffineExpr arg) |
| const void * | getAsOpaquePointer () const |
| Methods supporting C API. | |
| ImplType * | getImpl () const |
Additional Inherited Members | |
| Static Public Member Functions inherited from mlir::AffineExpr | |
| static AffineExpr | getFromOpaquePointer (const void *pointer) |
| Protected Attributes inherited from mlir::AffineExpr | |
| ImplType * | expr {nullptr} |
Affine binary operation expression.
An affine binary operation could be an add, mul, floordiv, ceildiv, or a modulo operation. (Subtraction is represented through a multiply by -1 and add.) These expressions are always constructed in a simplified form. For eg., the LHS and RHS operands can't both be constants. There are additional canonicalizing rules depending on the op type: see checks in the constructor.
Definition at line 214 of file AffineExpr.h.
Definition at line 216 of file AffineExpr.h.
| AffineBinaryOpExpr::AffineBinaryOpExpr | ( | AffineExpr::ImplType * | ptr | ) |
Definition at line 336 of file AffineExpr.cpp.
References mlir::AffineExpr::AffineExpr().
| AffineExpr AffineBinaryOpExpr::getLHS | ( | ) | const |
Definition at line 338 of file AffineExpr.cpp.
References mlir::AffineExpr::AffineExpr(), mlir::AffineExpr::expr, and lhs.
Referenced by createDimSizeExprForTiledLayout(), mlir::AffineExpr::getLargestKnownDivisor(), getSemiAffineExprFromFlatForm(), getTileSizePos(), mlir::AffineExpr::isMultipleOf(), and HasAffineDimExprVisitor::visitAffineBinaryOpExpr().
| AffineExpr AffineBinaryOpExpr::getRHS | ( | ) | const |
Definition at line 341 of file AffineExpr.cpp.
References mlir::AffineExpr::AffineExpr(), mlir::AffineExpr::expr, and rhs.
Referenced by createDimSizeExprForTiledLayout(), mlir::AffineExpr::getLargestKnownDivisor(), getSemiAffineExprFromFlatForm(), getTileSizePos(), mlir::AffineExpr::isMultipleOf(), HasAffineDimExprVisitor::visitAffineBinaryOpExpr(), mlir::SimpleAffineExprFlattener::visitModExpr(), and mlir::SimpleAffineExprFlattener::visitMulExpr().