24 #ifndef MLIR_IR_INTEGERSET_H
25 #define MLIR_IR_INTEGERSET_H
28 #include "llvm/ADT/ArrayRef.h"
33 struct IntegerSetStorage;
51 static IntegerSet get(
unsigned dimCount,
unsigned symbolCount,
60 return get(numDims, numSymbols, one,
true);
73 unsigned numResultDims,
74 unsigned numResultSyms);
76 explicit operator bool() {
return set; }
97 bool isEq(
unsigned idx)
const;
105 void print(raw_ostream &os)
const;
112 return static_cast<const void *
>(set);
116 reinterpret_cast<ImplType *
>(
const_cast<void *
>(pointer)));
Base type for affine expression.
An integer set representing a conjunction of one or more affine equalities and inequalities.
detail::IntegerSetStorage ImplType
void walkExprs(function_ref< void(AffineExpr)> callback) const
Walk all of the AffineExpr's in this set's constraints.
IntegerSet replaceDimsAndSymbols(ArrayRef< AffineExpr > dimReplacements, ArrayRef< AffineExpr > symReplacements, unsigned numResultDims, unsigned numResultSyms)
This method substitutes any uses of dimensions and symbols (e.g.
constexpr IntegerSet()=default
unsigned getNumDims() const
static IntegerSet get(unsigned dimCount, unsigned symbolCount, ArrayRef< AffineExpr > constraints, ArrayRef< bool > eqFlags)
MLIRContext * getContext() const
unsigned getNumInputs() const
bool operator==(IntegerSet other) const
unsigned getNumConstraints() const
static IntegerSet getEmptySet(unsigned numDims, unsigned numSymbols, MLIRContext *context)
friend ::llvm::hash_code hash_value(IntegerSet arg)
ArrayRef< AffineExpr > getConstraints() const
bool operator!=(IntegerSet other) const
unsigned getNumEqualities() const
bool isEmptyIntegerSet() const
Returns true if this is the canonical integer set.
static IntegerSet getFromOpaquePointer(const void *pointer)
const void * getAsOpaquePointer() const
Methods supporting C API.
AffineExpr getConstraint(unsigned idx) const
void print(raw_ostream &os) const
IntegerSet(ImplType *set)
unsigned getNumInequalities() const
bool isEq(unsigned idx) const
Returns true if the idx^th constraint is an equality, false if it is an inequality.
ArrayRef< bool > getEqFlags() const
Returns the equality bits, which specify whether each of the constraints is an equality or inequality...
unsigned getNumSymbols() const
MLIRContext is the top-level object for a collection of MLIR operations.
The OpAsmOpInterface, see OpAsmInterface.td for more details.
Include the generated interface declarations.
inline ::llvm::hash_code hash_value(IntegerSet arg)
AffineExpr getAffineConstantExpr(int64_t constant, MLIRContext *context)
inline ::llvm::hash_code hash_value(AffineExpr arg)
Make AffineExpr hashable.
static bool isEqual(mlir::IntegerSet LHS, mlir::IntegerSet RHS)
static unsigned getHashValue(mlir::IntegerSet val)
static mlir::IntegerSet getEmptyKey()
static mlir::IntegerSet getTombstoneKey()