diff --git a/mlir/include/mlir/Analysis/AffineStructures.h b/mlir/include/mlir/Analysis/AffineStructures.h --- a/mlir/include/mlir/Analysis/AffineStructures.h +++ b/mlir/include/mlir/Analysis/AffineStructures.h @@ -30,65 +30,6 @@ class MemRefType; struct MutableAffineMap; -/// A mutable integer set. Its affine expressions are however unique. -struct MutableIntegerSet { -public: - MutableIntegerSet(IntegerSet set, MLIRContext *context); - - /// Create a universal set (no constraints). - MutableIntegerSet(unsigned numDims, unsigned numSymbols, - MLIRContext *context); - - unsigned getNumDims() const { return numDims; } - unsigned getNumSymbols() const { return numSymbols; } - unsigned getNumConstraints() const { return constraints.size(); } - - void clear() { - constraints.clear(); - eqFlags.clear(); - } - -private: - unsigned numDims; - unsigned numSymbols; - - SmallVector constraints; - SmallVector eqFlags; -}; - -/// An IntegerValueSet is an integer set plus its operands. -// Both, the integer set being pointed to and the operands can change during -// analysis, simplification, and transformation. -class IntegerValueSet { - /// Constructs an integer value set from an affine value map. - // This will lead to a single equality in 'set'. - explicit IntegerValueSet(const AffineValueMap &avm); - - /// Returns true if this integer set is determined to be empty. Emptiness is - /// checked by by eliminating identifiers successively (through either - /// Gaussian or Fourier-Motzkin) while using the GCD test and a trivial - /// invalid constraint check. Returns 'true' if the constraint system is found - /// to be empty; false otherwise. This method is exact for rational spaces but - /// not integer spaces - thus, if it returns true, the set is provably integer - /// empty as well, but if it returns false, it doesn't necessarily mean an - /// integer point exists in it. This method also returns false where an - /// explosion of constraints is detected - due to the super-exponential - /// worse-case complexity of Fourier-Motzkin elimination (rare for realistic - /// problem cases but possible for artificial adversarial or improperly - // constructed ones), this method returns false conservatively. - bool isEmpty() const; - - bool getNumDims() const { return set.getNumDims(); } - bool getNumSymbols() const { return set.getNumSymbols(); } - -private: - // The set pointed to may itself change unlike in IR structures like - // 'AffineCondition'. - MutableIntegerSet set; - /// The SSA operands binding to the dim's and symbols of 'set'. - SmallVector operands; -}; - /// A flat list of affine equalities and inequalities in the form. /// Inequality: c_0*x_0 + c_1*x_1 + .... + c_{n-1}*x_{n-1} >= 0 /// Equality: c_0*x_0 + c_1*x_1 + .... + c_{n-1}*x_{n-1} == 0 @@ -167,10 +108,6 @@ /// Creates an affine constraint system from an IntegerSet. explicit FlatAffineConstraints(IntegerSet set); - /// Create an affine constraint system from an IntegerValueSet. - // TODO(bondhugula) - explicit FlatAffineConstraints(const IntegerValueSet &set); - FlatAffineConstraints(const FlatAffineConstraints &other); FlatAffineConstraints(ArrayRef avmRef, diff --git a/mlir/lib/Analysis/AffineStructures.cpp b/mlir/lib/Analysis/AffineStructures.cpp --- a/mlir/lib/Analysis/AffineStructures.cpp +++ b/mlir/lib/Analysis/AffineStructures.cpp @@ -137,16 +137,6 @@ localVarCst); } -MutableIntegerSet::MutableIntegerSet(IntegerSet set, MLIRContext *context) - : numDims(set.getNumDims()), numSymbols(set.getNumSymbols()) { - // TODO(bondhugula) -} - -// Universal set. -MutableIntegerSet::MutableIntegerSet(unsigned numDims, unsigned numSymbols, - MLIRContext *context) - : numDims(numDims), numSymbols(numSymbols) {} - //===----------------------------------------------------------------------===// // FlatAffineConstraints. //===----------------------------------------------------------------------===//