forked from OSchip/llvm-project
[mlir] NFC: remove IntegerValueSet / MutableIntegerSet
Summary: - these are unused and really not needed now given flat affine constraints Differential Revision: https://reviews.llvm.org/D75792
This commit is contained in:
parent
97572fa6e9
commit
e241573d59
|
@ -30,65 +30,6 @@ class HyperRectangularSet;
|
||||||
class MemRefType;
|
class MemRefType;
|
||||||
struct MutableAffineMap;
|
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<AffineExpr, 8> constraints;
|
|
||||||
SmallVector<bool, 8> 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<Value, 4> operands;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// A flat list of affine equalities and inequalities in the form.
|
/// 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
|
/// 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
|
/// Equality: c_0*x_0 + c_1*x_1 + .... + c_{n-1}*x_{n-1} == 0
|
||||||
|
@ -167,10 +108,6 @@ public:
|
||||||
/// Creates an affine constraint system from an IntegerSet.
|
/// Creates an affine constraint system from an IntegerSet.
|
||||||
explicit FlatAffineConstraints(IntegerSet set);
|
explicit FlatAffineConstraints(IntegerSet set);
|
||||||
|
|
||||||
/// Create an affine constraint system from an IntegerValueSet.
|
|
||||||
// TODO(bondhugula)
|
|
||||||
explicit FlatAffineConstraints(const IntegerValueSet &set);
|
|
||||||
|
|
||||||
FlatAffineConstraints(const FlatAffineConstraints &other);
|
FlatAffineConstraints(const FlatAffineConstraints &other);
|
||||||
|
|
||||||
FlatAffineConstraints(ArrayRef<const AffineValueMap *> avmRef,
|
FlatAffineConstraints(ArrayRef<const AffineValueMap *> avmRef,
|
||||||
|
|
|
@ -137,16 +137,6 @@ LogicalResult mlir::getFlattenedAffineExprs(
|
||||||
localVarCst);
|
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.
|
// FlatAffineConstraints.
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
Loading…
Reference in New Issue