diff --git a/mlir/include/mlir/Analysis/PresburgerSet.h b/mlir/include/mlir/Analysis/PresburgerSet.h --- a/mlir/include/mlir/Analysis/PresburgerSet.h +++ b/mlir/include/mlir/Analysis/PresburgerSet.h @@ -67,14 +67,17 @@ void print(raw_ostream &os) const; void dump() const; - /// Return the complement of this set. + /// Return the complement of this set. Computing the complement of a set + /// containing divisions is not yet supported. PresburgerSet complement() const; /// Return the set difference of this set and the given set, i.e., - /// return `this \ set`. + /// return `this \ set`. Subtracting when either set contains divisions is not + /// yet supported. PresburgerSet subtract(const PresburgerSet &set) const; /// Return true if this set is equal to the given set, and false otherwise. + /// Checking equality when either set contains divisions is not yet supported. bool isEqual(const PresburgerSet &set) const; /// Return a universe set of the specified type that contains all points. diff --git a/mlir/lib/Analysis/PresburgerSet.cpp b/mlir/lib/Analysis/PresburgerSet.cpp --- a/mlir/lib/Analysis/PresburgerSet.cpp +++ b/mlir/lib/Analysis/PresburgerSet.cpp @@ -170,6 +170,8 @@ return; } const FlatAffineConstraints &sI = s.getFlatAffineConstraints(i); + assert(sI.getNumLocalIds() == 0 && + "Subtracting sets with divisions is not yet supported!"); unsigned initialSnapshot = simplex.getSnapshot(); unsigned offset = simplex.numConstraints(); simplex.intersectFlatAffineConstraints(sI); @@ -254,6 +256,8 @@ PresburgerSet PresburgerSet::getSetDifference(FlatAffineConstraints fac, const PresburgerSet &set) { assertDimensionsCompatible(fac, set); + assert(fac.getNumLocalIds() == 0 && + "Subtracting sets with divisions is not yet supported!"); if (fac.isEmptyByGCDTest()) return PresburgerSet::getEmptySet(fac.getNumDimIds(), fac.getNumSymbolIds());