13#ifndef MLIR_DIALECT_AFFINE_IR_AFFINEVALUEMAP_H
14#define MLIR_DIALECT_AFFINE_IR_AFFINEVALUEMAP_H
59 bool pairwise =
true);
90 inline unsigned getNumDims()
const {
return map.getNumDims(); }
106 return !(*
this == other);
Base type for affine expression.
A multi-dimensional affine map Affine map's are immutable like Type's, and they are uniqued.
This class provides an abstraction over the different types of ranges over Values.
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
An AffineValueMap is an affine map plus its ML value operands and results for analysis purposes.
Value getOperand(unsigned i) const
bool isConstant(unsigned idx) const
Return true if the result at 'idx' is a constant, false otherwise.
static void cartesianProductDifference(const AffineValueMap &a, const AffineValueMap &b, AffineValueMap *res)
Subtract results of 'b' from results of 'a' over their Cartesian product.
bool isIdentity() const
Return true if this is an identity map.
bool operator==(const AffineValueMap &other) const
Checks if the application of this map to its operands is semantically equal to other's.
LogicalResult canonicalize()
Attempts to canonicalize the map and operands.
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.
static void combine(const AffineValueMap &a, const AffineValueMap &b, AffineExpr expr, AffineValueMap *res, bool pairwise=true)
Combine results from 'a' and 'b' using 'expr'.
void composeSimplifyAndCanonicalize()
Composes all incoming affine.apply ops and then simplifies and canonicalizes the map and operands.
unsigned getNumSymbols() const
ArrayRef< Value > getOperands() const
unsigned getNumDims() const
AffineExpr getResult(unsigned i)
bool operator!=(const AffineValueMap &other) const
unsigned getNumOperands() const
AffineMap getAffineMap() const
bool isFunctionOf(unsigned idx, Value value) const
Return true if the idx^th result depends on 'value', false otherwise.
void setResult(unsigned i, AffineExpr e)
void reset(AffineMap map, ValueRange operands, ValueRange results={})
unsigned getNumResults() const
static void difference(const AffineValueMap &a, const AffineValueMap &b, AffineValueMap *res)
Subtract each result of 'b' from the result of 'a' at the same index; the result counts must be equal...
Include the generated interface declarations.
A mutable affine map. Its affine expressions are however unique.