[Mlir-commits] [mlir] [MLIR][Presburger] Add simplify function (PR	#69107)
    Kunwar Grover 
    llvmlistbot at llvm.org
       
    Sun Oct 15 13:39:18 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.
+  auto row = getInequality(0).drop_back();
----------------
Groverkss wrote:
nit: dont use auto here.
https://github.com/llvm/llvm-project/pull/69107
    
    
More information about the Mlir-commits
mailing list