diff --git a/mlir/include/mlir/Analysis/Presburger/IntegerRelation.h b/mlir/include/mlir/Analysis/Presburger/IntegerRelation.h --- a/mlir/include/mlir/Analysis/Presburger/IntegerRelation.h +++ b/mlir/include/mlir/Analysis/Presburger/IntegerRelation.h @@ -24,8 +24,9 @@ namespace mlir { namespace presburger { -/// An IntegerRelation is a PresburgerSpace subject to affine constraints. -/// Affine constraints can be inequalities or equalities in the form: +/// An IntegerRelation represents the set of points from a PresburgerSpace that +/// satisfy a list of affine constraints. Affine constraints can be inequalities +/// or equalities in the form: /// /// Inequality: c_0*x_0 + c_1*x_1 + .... + c_{n-1}*x_{n-1} + c_n >= 0 /// Equality : c_0*x_0 + c_1*x_1 + .... + c_{n-1}*x_{n-1} + c_n == 0 @@ -42,7 +43,7 @@ /// /// Since IntegerRelation makes a distinction between dimensions, IdKind::Range /// and IdKind::Domain should be used to refer to dimension identifiers. -class IntegerRelation : public PresburgerSpace { +class IntegerRelation { public: /// All derived classes of IntegerRelation. enum class Kind { @@ -58,11 +59,11 @@ IntegerRelation(unsigned numReservedInequalities, unsigned numReservedEqualities, unsigned numReservedCols, const PresburgerSpace &space) - : PresburgerSpace(space), - equalities(0, getNumIds() + 1, numReservedEqualities, numReservedCols), - inequalities(0, getNumIds() + 1, numReservedInequalities, + : space(space), equalities(0, space.getNumIds() + 1, + numReservedEqualities, numReservedCols), + inequalities(0, space.getNumIds() + 1, numReservedInequalities, numReservedCols) { - assert(numReservedCols >= getNumIds() + 1); + assert(numReservedCols >= space.getNumIds() + 1); } /// Constructs a relation with the specified number of dimensions and symbols. @@ -71,6 +72,8 @@ /*numReservedEqualities=*/0, /*numReservedCols=*/space.getNumIds() + 1, space) {} + virtual ~IntegerRelation() = default; + /// Return a system with no constraints, i.e., one which is satisfied by all /// points. static IntegerRelation getUniverse(const PresburgerSpace &space) { @@ -85,6 +88,16 @@ // Clones this object. std::unique_ptr clone() const; + /// Returns a reference to the underlying space. + const PresburgerSpace &getSpace() const { return space; } + + /// Returns a copy of the space without locals. + PresburgerSpace getSpaceWithoutLocals() const { + return PresburgerSpace::getRelationSpace(space.getNumDomainIds(), + space.getNumRangeIds(), + space.getNumSymbolIds()); + } + /// Appends constraints from `other` into `this`. This is equivalent to an /// intersection with no simplification of any sort attempted. void append(const IntegerRelation &other); @@ -117,8 +130,19 @@ return getNumInequalities() + getNumEqualities(); } + unsigned getNumDomainIds() const { return space.getNumDomainIds(); } + unsigned getNumRangeIds() const { return space.getNumRangeIds(); } + unsigned getNumSymbolIds() const { return space.getNumSymbolIds(); } + unsigned getNumLocalIds() const { return space.getNumLocalIds(); } + + unsigned getNumDimIds() const { return space.getNumDimIds(); } + unsigned getNumDimAndSymbolIds() const { + return space.getNumDimAndSymbolIds(); + } + unsigned getNumIds() const { return space.getNumIds(); } + /// Returns the number of columns in the constraint system. - inline unsigned getNumCols() const { return getNumIds() + 1; } + inline unsigned getNumCols() const { return space.getNumIds() + 1; } inline unsigned getNumEqualities() const { return equalities.getNumRows(); } @@ -142,6 +166,27 @@ return inequalities.getRow(idx); } + /// Get the number of ids of the specified kind. + unsigned getNumIdKind(IdKind kind) const { return space.getNumIdKind(kind); }; + + /// Return the index at which the specified kind of id starts. + unsigned getIdKindOffset(IdKind kind) const { + return space.getIdKindOffset(kind); + }; + + /// Return the index at Which the specified kind of id ends. + unsigned getIdKindEnd(IdKind kind) const { return space.getIdKindEnd(kind); }; + + /// Get the number of elements of the specified kind in the range + /// [idStart, idLimit). + unsigned getIdKindOverlap(IdKind kind, unsigned idStart, + unsigned idLimit) const { + return space.getIdKindOverlap(kind, idStart, idLimit); + }; + + /// Return the IdKind of the id at the specified position. + IdKind getIdKindAt(unsigned pos) const { return space.getIdKindAt(pos); }; + /// The struct CountsSnapshot stores the count of each IdKind, and also of /// each constraint type. getCounts() returns a CountsSnapshot object /// describing the current state of the IntegerRelation. truncate() truncates @@ -171,7 +216,7 @@ /// corresponding to the added identifiers are initialized to zero. Return the /// absolute column position (i.e., not relative to the kind of identifier) /// of the first added identifier. - unsigned insertId(IdKind kind, unsigned pos, unsigned num = 1) override; + virtual unsigned insertId(IdKind kind, unsigned pos, unsigned num = 1); /// Append `num` identifiers of the specified kind after the last identifier. /// of that kind. Return the position of the first appended column relative to @@ -193,7 +238,7 @@ /// within the specified range) from the system. The specified location is /// relative to the first identifier of the specified kind. void removeId(IdKind kind, unsigned pos); - void removeIdRange(IdKind kind, unsigned idStart, unsigned idLimit) override; + virtual void removeIdRange(IdKind kind, unsigned idStart, unsigned idLimit); /// Removes the specified identifier from the system. void removeId(unsigned pos); @@ -432,6 +477,14 @@ /// match. void mergeLocalIds(IntegerRelation &other); + /// Changes the partition between dimensions and symbols. Depending on the new + /// symbol count, either a chunk of dimensional identifiers immediately before + /// the split become symbols, or some of the symbols immediately after the + /// split become dimensions. + void setDimSymbolSeparation(unsigned newSymbolCount) { + space.setDimSymbolSeparation(newSymbolCount); + } + void print(raw_ostream &os) const; void dump() const; @@ -512,7 +565,10 @@ /// arrays as needed. void removeIdRange(unsigned idStart, unsigned idLimit); - using PresburgerSpace::truncateIdKind; + /// Truncate the ids of the specified kind to the specified number by dropping + /// some ids at the end. `num` must be less than the current number. + void truncateIdKind(IdKind kind, unsigned num); + /// Truncate the ids to the number in the space of the specified /// CountsSnapshot. void truncateIdKind(IdKind kind, const CountsSnapshot &counts); @@ -529,6 +585,8 @@ // constraints. This is conservatively set low and can be raised if needed. constexpr static unsigned kExplosionFactor = 32; + PresburgerSpace space; + /// Coefficients of affine equalities (in == 0 form). Matrix equalities; @@ -537,9 +595,10 @@ }; struct SymbolicLexMin; -/// An IntegerPolyhedron is a PresburgerSpace subject to affine -/// constraints. Affine constraints can be inequalities or equalities in the -/// form: + +/// An IntegerPolyhedron represents the set of points from a PresburgerSpace +/// that satisfy a list of affine constraints. Affine constraints can be +/// inequalities or equalities in the form: /// /// Inequality: c_0*x_0 + c_1*x_1 + .... + c_{n-1}*x_{n-1} + c_n >= 0 /// Equality : c_0*x_0 + c_1*x_1 + .... + c_{n-1}*x_{n-1} + c_n == 0 diff --git a/mlir/include/mlir/Analysis/Presburger/PWMAFunction.h b/mlir/include/mlir/Analysis/Presburger/PWMAFunction.h --- a/mlir/include/mlir/Analysis/Presburger/PWMAFunction.h +++ b/mlir/include/mlir/Analysis/Presburger/PWMAFunction.h @@ -52,8 +52,7 @@ using IntegerPolyhedron::getNumIds; using IntegerPolyhedron::getNumLocalIds; using IntegerPolyhedron::getNumSymbolIds; - using PresburgerSpace::isSpaceCompatible; - using PresburgerSpace::isSpaceEqual; + using IntegerPolyhedron::getSpace; MultiAffineFunction(const IntegerPolyhedron &domain, const Matrix &output) : IntegerPolyhedron(domain), output(output) {} @@ -139,22 +138,26 @@ /// /// Support is provided to compare equality of two such functions as well as /// finding the value of the function at a point. -class PWMAFunction : private PresburgerSpace { +class PWMAFunction { public: PWMAFunction(const PresburgerSpace &space, unsigned numOutputs) - : PresburgerSpace(space), numOutputs(numOutputs) { - assert(getNumDomainIds() == 0 && "Set type space should zero domain ids."); - assert(getNumLocalIds() == 0 && "PWMAFunction cannot have local ids."); + : space(space), numOutputs(numOutputs) { + assert(space.getNumDomainIds() == 0 && + "Set type space should have zero domain ids."); + assert(space.getNumLocalIds() == 0 && + "PWMAFunction cannot have local ids."); assert(numOutputs >= 1 && "The function must output something!"); } + const PresburgerSpace &getSpace() const { return space; } + void addPiece(const MultiAffineFunction &piece); void addPiece(const IntegerPolyhedron &domain, const Matrix &output); const MultiAffineFunction &getPiece(unsigned i) const { return pieces[i]; } unsigned getNumPieces() const { return pieces.size(); } unsigned getNumOutputs() const { return numOutputs; } - unsigned getNumInputs() const { return getNumIds(); } + unsigned getNumInputs() const { return space.getNumIds(); } MultiAffineFunction &getPiece(unsigned i) { return pieces[i]; } /// Return the domain of this piece-wise MultiAffineFunction. This is the @@ -179,6 +182,8 @@ void dump() const; private: + PresburgerSpace space; + /// The list of pieces in this piece-wise MultiAffineFunction. SmallVector pieces; diff --git a/mlir/include/mlir/Analysis/Presburger/PresburgerRelation.h b/mlir/include/mlir/Analysis/Presburger/PresburgerRelation.h --- a/mlir/include/mlir/Analysis/Presburger/PresburgerRelation.h +++ b/mlir/include/mlir/Analysis/Presburger/PresburgerRelation.h @@ -34,7 +34,7 @@ /// Note that there are no invariants guaranteed on the list of disjuncts /// other than that they are all in the same PresburgerSpace. For example, the /// relations may overlap with each other. -class PresburgerRelation : public PresburgerSpace { +class PresburgerRelation { public: /// Return a universe set of the specified type that contains all points. static PresburgerRelation getUniverse(const PresburgerSpace &space); @@ -44,9 +44,17 @@ explicit PresburgerRelation(const IntegerRelation &disjunct); + unsigned getNumDomainIds() const { return space.getNumDomainIds(); } + unsigned getNumRangeIds() const { return space.getNumRangeIds(); } + unsigned getNumSymbolIds() const { return space.getNumSymbolIds(); } + unsigned getNumLocalIds() const { return space.getNumLocalIds(); } + unsigned getNumIds() const { return space.getNumIds(); } + /// Return the number of disjuncts in the union. unsigned getNumDisjuncts() const; + const PresburgerSpace &getSpace() const { return space; } + /// Return a reference to the list of disjuncts. ArrayRef getAllDisjuncts() const; @@ -116,12 +124,13 @@ protected: /// Construct an empty PresburgerRelation with the specified number of /// dimension and symbols. - explicit PresburgerRelation(const PresburgerSpace &space) - : PresburgerSpace(space) { + explicit PresburgerRelation(const PresburgerSpace &space) : space(space) { assert(space.getNumLocalIds() == 0 && "PresburgerRelation cannot have local ids."); } + PresburgerSpace space; + /// The list of disjuncts that this set is the union of. SmallVector disjuncts; diff --git a/mlir/include/mlir/Analysis/Presburger/PresburgerSpace.h b/mlir/include/mlir/Analysis/Presburger/PresburgerSpace.h --- a/mlir/include/mlir/Analysis/Presburger/PresburgerSpace.h +++ b/mlir/include/mlir/Analysis/Presburger/PresburgerSpace.h @@ -78,18 +78,6 @@ numLocals); } - /// Returns the space. This function is primarily intended to be used from - /// derived classes. - PresburgerSpace getSpace() const { return *this; } - - /// Returns the space without locals. This function is primarily intended to - /// be used from derived classes. - PresburgerSpace getSpaceWithoutLocals() const { - return PresburgerSpace(numDomain, numRange, numSymbols); - } - - virtual ~PresburgerSpace() = default; - unsigned getNumDomainIds() const { return numDomain; } unsigned getNumRangeIds() const { return numRange; } unsigned getNumSetDimIds() const { return numRange; } @@ -125,24 +113,20 @@ /// Positions are relative to the kind of identifier. Return the absolute /// column position (i.e., not relative to the kind of identifier) of the /// first added identifier. - virtual unsigned insertId(IdKind kind, unsigned pos, unsigned num = 1); + unsigned insertId(IdKind kind, unsigned pos, unsigned num = 1); /// Removes identifiers of the specified kind in the column range [idStart, /// idLimit). The range is relative to the kind of identifier. - virtual void removeIdRange(IdKind kind, unsigned idStart, unsigned idLimit); - - /// Truncate the ids of the specified kind to the specified number by dropping - /// some ids at the end. `num` must be less than the current number. - void truncateIdKind(IdKind kind, unsigned num); + void removeIdRange(IdKind kind, unsigned idStart, unsigned idLimit); /// Returns true if both the spaces are compatible i.e. if both spaces have /// the same number of identifiers of each kind (excluding locals). - bool isSpaceCompatible(const PresburgerSpace &other) const; + bool isCompatible(const PresburgerSpace &other) const; /// Returns true if both the spaces are equal including local identifiers i.e. /// if both spaces have the same number of identifiers of each kind (including /// locals). - bool isSpaceEqual(const PresburgerSpace &other) const; + bool isEqual(const PresburgerSpace &other) const; /// Changes the partition between dimensions and symbols. Depending on the new /// symbol count, either a chunk of dimensional identifiers immediately before diff --git a/mlir/include/mlir/Dialect/Affine/Analysis/AffineStructures.h b/mlir/include/mlir/Dialect/Affine/Analysis/AffineStructures.h --- a/mlir/include/mlir/Dialect/Affine/Analysis/AffineStructures.h +++ b/mlir/include/mlir/Dialect/Affine/Analysis/AffineStructures.h @@ -43,9 +43,10 @@ unsigned numReservedCols, unsigned numDims, unsigned numSymbols, unsigned numLocals, ArrayRef> valArgs = {}) - : IntegerPolyhedron( - numReservedInequalities, numReservedEqualities, numReservedCols, - PresburgerSpace::getSetSpace(numDims, numSymbols, numLocals)) { + : IntegerPolyhedron(numReservedInequalities, numReservedEqualities, + numReservedCols, + presburger::PresburgerSpace::getSetSpace( + numDims, numSymbols, numLocals)) { assert(numReservedCols >= getNumIds() + 1); assert(valArgs.empty() || valArgs.size() == getNumIds()); values.reserve(numReservedCols); diff --git a/mlir/lib/Analysis/Presburger/IntegerRelation.cpp b/mlir/lib/Analysis/Presburger/IntegerRelation.cpp --- a/mlir/lib/Analysis/Presburger/IntegerRelation.cpp +++ b/mlir/lib/Analysis/Presburger/IntegerRelation.cpp @@ -39,7 +39,7 @@ } void IntegerRelation::append(const IntegerRelation &other) { - assert(isSpaceEqual(other) && "Spaces must be equal."); + assert(space.isEqual(other.getSpace()) && "Spaces must be equal."); inequalities.reserveRows(inequalities.getNumRows() + other.getNumInequalities()); @@ -61,12 +61,12 @@ } bool IntegerRelation::isEqual(const IntegerRelation &other) const { - assert(isSpaceEqual(other) && "Spaces must be equal."); + assert(space.isEqual(other.getSpace()) && "Spaces must be equal."); return PresburgerRelation(*this).isEqual(PresburgerRelation(other)); } bool IntegerRelation::isSubsetOf(const IntegerRelation &other) const { - assert(isSpaceEqual(other) && "Spaces must be equal."); + assert(space.isEqual(other.getSpace()) && "Spaces must be equal."); return PresburgerRelation(*this).isSubsetOf(PresburgerRelation(other)); } @@ -129,7 +129,13 @@ } IntegerRelation::CountsSnapshot IntegerRelation::getCounts() const { - return {PresburgerSpace(*this), getNumInequalities(), getNumEqualities()}; + return {getSpace(), getNumInequalities(), getNumEqualities()}; +} + +void IntegerRelation::truncateIdKind(IdKind kind, unsigned num) { + unsigned curNum = getNumIdKind(kind); + assert(num <= curNum && "Can't truncate to more ids!"); + removeIdRange(kind, num, curNum); } void IntegerRelation::truncateIdKind(IdKind kind, @@ -164,7 +170,7 @@ unsigned IntegerRelation::insertId(IdKind kind, unsigned pos, unsigned num) { assert(pos <= getNumIdKind(kind)); - unsigned insertPos = PresburgerSpace::insertId(kind, pos, num); + unsigned insertPos = space.insertId(kind, pos, num); inequalities.insertColumns(insertPos, num); equalities.insertColumns(insertPos, num); return insertPos; @@ -208,7 +214,7 @@ inequalities.removeColumns(offset + idStart, idLimit - idStart); // Remove eliminated identifiers from the space. - PresburgerSpace::removeIdRange(kind, idStart, idLimit); + space.removeIdRange(kind, idStart, idLimit); } void IntegerRelation::removeIdRange(unsigned idStart, unsigned idLimit) { @@ -1083,7 +1089,8 @@ /// division representation for some local id cannot be obtained, and thus these /// local ids are not considered for detecting duplicates. void IntegerRelation::mergeLocalIds(IntegerRelation &other) { - assert(isSpaceCompatible(other) && "Spaces should be compatible."); + assert(space.isCompatible(other.getSpace()) && + "Spaces should be compatible."); IntegerRelation &relA = *this; IntegerRelation &relB = other; @@ -1913,7 +1920,7 @@ // lower bounds and the max of the upper bounds along each of the dimensions. LogicalResult IntegerRelation::unionBoundingBox(const IntegerRelation &otherCst) { - assert(isSpaceEqual(otherCst) && "Spaces should match."); + assert(space.isEqual(otherCst.getSpace()) && "Spaces should match."); assert(getNumLocalIds() == 0 && "local ids not supported yet here"); // Get the constraints common to both systems; these will be added as is to @@ -2077,7 +2084,7 @@ } void IntegerRelation::printSpace(raw_ostream &os) const { - PresburgerSpace::print(os); + space.print(os); os << getNumConstraints() << " constraints\n"; } diff --git a/mlir/lib/Analysis/Presburger/PWMAFunction.cpp b/mlir/lib/Analysis/Presburger/PWMAFunction.cpp --- a/mlir/lib/Analysis/Presburger/PWMAFunction.cpp +++ b/mlir/lib/Analysis/Presburger/PWMAFunction.cpp @@ -83,7 +83,8 @@ void MultiAffineFunction::dump() const { print(llvm::errs()); } bool MultiAffineFunction::isEqual(const MultiAffineFunction &other) const { - return isSpaceCompatible(other) && getDomain().isEqual(other.getDomain()) && + return space.isCompatible(other.getSpace()) && + getDomain().isEqual(other.getDomain()) && isEqualWhereDomainsOverlap(other); } @@ -128,7 +129,7 @@ bool MultiAffineFunction::isEqualWhereDomainsOverlap( MultiAffineFunction other) const { - if (!isSpaceCompatible(other)) + if (!space.isCompatible(other.getSpace())) return false; // `commonFunc` has the same output as `this`. @@ -161,7 +162,7 @@ /// Two PWMAFunctions are equal if they have the same dimensionalities, /// the same domain, and take the same value at every point in the domain. bool PWMAFunction::isEqual(const PWMAFunction &other) const { - if (!isSpaceCompatible(other)) + if (!space.isCompatible(other.space)) return false; if (!this->getDomain().isEqual(other.getDomain())) @@ -179,7 +180,7 @@ } void PWMAFunction::addPiece(const MultiAffineFunction &piece) { - assert(piece.isSpaceCompatible(*this) && + assert(space.isCompatible(piece.getSpace()) && "Piece to be added is not compatible with this PWMAFunction!"); assert(piece.isConsistent() && "Piece is internally inconsistent!"); assert(this->getDomain() diff --git a/mlir/lib/Analysis/Presburger/PresburgerRelation.cpp b/mlir/lib/Analysis/Presburger/PresburgerRelation.cpp --- a/mlir/lib/Analysis/Presburger/PresburgerRelation.cpp +++ b/mlir/lib/Analysis/Presburger/PresburgerRelation.cpp @@ -17,7 +17,7 @@ using namespace presburger; PresburgerRelation::PresburgerRelation(const IntegerRelation &disjunct) - : PresburgerSpace(disjunct.getSpaceWithoutLocals()) { + : space(disjunct.getSpaceWithoutLocals()) { unionInPlace(disjunct); } @@ -37,7 +37,7 @@ /// Mutate this set, turning it into the union of this set and the given /// IntegerRelation. void PresburgerRelation::unionInPlace(const IntegerRelation &disjunct) { - assert(isSpaceCompatible(disjunct) && "Spaces should match"); + assert(space.isCompatible(disjunct.getSpace()) && "Spaces should match"); disjuncts.push_back(disjunct); } @@ -46,7 +46,7 @@ /// This is accomplished by simply adding all the disjuncts of the given set /// to this set. void PresburgerRelation::unionInPlace(const PresburgerRelation &set) { - assert(isSpaceCompatible(set) && "Spaces should match"); + assert(space.isCompatible(set.getSpace()) && "Spaces should match"); for (const IntegerRelation &disjunct : set.disjuncts) unionInPlace(disjunct); } @@ -54,7 +54,7 @@ /// Return the union of this set and the given set. PresburgerRelation PresburgerRelation::unionSet(const PresburgerRelation &set) const { - assert(isSpaceCompatible(set) && "Spaces should match"); + assert(space.isCompatible(set.getSpace()) && "Spaces should match"); PresburgerRelation result = *this; result.unionInPlace(set); return result; @@ -87,7 +87,7 @@ // variables of both. PresburgerRelation PresburgerRelation::intersect(const PresburgerRelation &set) const { - assert(isSpaceCompatible(set) && "Spaces should match"); + assert(space.isCompatible(set.getSpace()) && "Spaces should match"); PresburgerRelation result(getSpace()); for (const IntegerRelation &csA : disjuncts) { @@ -163,7 +163,7 @@ /// static PresburgerRelation getSetDifference(IntegerRelation b, const PresburgerRelation &s) { - assert(b.isSpaceCompatible(s) && "Spaces should match"); + assert(b.getSpace().isCompatible(s.getSpace()) && "Spaces should match"); if (b.isEmptyByGCDTest()) return PresburgerRelation::getEmpty(b.getSpaceWithoutLocals()); @@ -364,7 +364,7 @@ /// return `this \ set`. PresburgerRelation PresburgerRelation::subtract(const PresburgerRelation &set) const { - assert(isSpaceCompatible(set) && "Spaces should match"); + assert(space.isCompatible(set.getSpace()) && "Spaces should match"); PresburgerRelation result(getSpace()); // We compute (U_i t_i) \ (U_i set_i) as U_i (t_i \ V_i set_i). for (const IntegerRelation &disjunct : disjuncts) @@ -381,7 +381,7 @@ /// Two sets are equal iff they are subsets of each other. bool PresburgerRelation::isEqual(const PresburgerRelation &set) const { - assert(isSpaceCompatible(set) && "Spaces should match"); + assert(space.isCompatible(set.getSpace()) && "Spaces should match"); return this->isSubsetOf(set) && set.isSubsetOf(*this); } diff --git a/mlir/lib/Analysis/Presburger/PresburgerSpace.cpp b/mlir/lib/Analysis/Presburger/PresburgerSpace.cpp --- a/mlir/lib/Analysis/Presburger/PresburgerSpace.cpp +++ b/mlir/lib/Analysis/Presburger/PresburgerSpace.cpp @@ -104,20 +104,14 @@ numLocals -= numIdsEliminated; } -void PresburgerSpace::truncateIdKind(IdKind kind, unsigned num) { - unsigned curNum = getNumIdKind(kind); - assert(num <= curNum && "Can't truncate to more ids!"); - removeIdRange(kind, num, curNum); -} - -bool PresburgerSpace::isSpaceCompatible(const PresburgerSpace &other) const { +bool PresburgerSpace::isCompatible(const PresburgerSpace &other) const { return getNumDomainIds() == other.getNumDomainIds() && getNumRangeIds() == other.getNumRangeIds() && getNumSymbolIds() == other.getNumSymbolIds(); } -bool PresburgerSpace::isSpaceEqual(const PresburgerSpace &other) const { - return isSpaceCompatible(other) && getNumLocalIds() == other.getNumLocalIds(); +bool PresburgerSpace::isEqual(const PresburgerSpace &other) const { + return isCompatible(other) && getNumLocalIds() == other.getNumLocalIds(); } void PresburgerSpace::setDimSymbolSeparation(unsigned newSymbolCount) {