[Mlir-commits] [mlir] [MLIR][Presburger] Add simplify function (PR #69107)

Kunwar Grover llvmlistbot at llvm.org
Sun Oct 15 13:39:19 PDT 2023


================
@@ -2216,6 +2288,74 @@ IntegerPolyhedron IntegerRelation::getDomainSet() const {
   return IntegerPolyhedron(std::move(copyRel));
 }
 
+bool IntegerRelation::removeDuplicateConstraints() {
+  bool changed = false;
+  SmallDenseMap<ArrayRef<MPInt>, unsigned> hashTable;
+  unsigned ineqs = getNumInequalities(), cols = getNumCols();
+
+  if (ineqs <= 1)
+    return changed;
+
+  // Check only the non-constant part of the constraint is the same.
----------------
Groverkss wrote:

nit: Check if the non-constant

https://github.com/llvm/llvm-project/pull/69107


More information about the Mlir-commits mailing list