[Mlir-commits] [mlir] [MLIR][Presburger][WIP] Implement vertex enumeration and chamber decomposition for polytope generating function computation. (PR #78987)

Arjun P llvmlistbot at llvm.org
Mon Jan 22 08:11:27 PST 2024


================
@@ -2498,6 +2498,50 @@ void IntegerRelation::printSpace(raw_ostream &os) const {
   os << getNumConstraints() << " constraints\n";
 }
 
+void IntegerRelation::removeTrivialEqualities() {
+  bool flag;
+  for (unsigned i = 0, e = getNumInequalities(); i < e; i++) {
+    flag = true;
+    for (unsigned j = 0, f = getNumVars(); j < f + 1; j++)
+      if (atEq(i, j) != 0)
+        flag = false;
+    if (flag)
+      removeEquality(i);
+  }
----------------
Superty wrote:

this doesn't exist already?

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


More information about the Mlir-commits mailing list