[Mlir-commits] [mlir] [MLIR][Presburger] Make printing aligned to assist in debugging (PR #107648)

Amy Wang llvmlistbot at llvm.org
Wed Sep 11 19:01:26 PDT 2024


================
@@ -2589,19 +2592,28 @@ void IntegerRelation::mergeAndCompose(const IntegerRelation &other) {
 void IntegerRelation::print(raw_ostream &os) const {
   assert(hasConsistentState());
   printSpace(os);
+  PrintTableMetrics ptm = {0, 0, "-"};
+  for (unsigned i = 0, e = getNumEqualities(); i < e; ++i) {
+    for (unsigned j = 0, f = getNumCols(); j < f; ++j)
+      updatePrintMetrics<DynamicAPInt>(atEq(i, j), ptm);
----------------
kaitingwang wrote:

This is a good point!  Not sure how I never noticed this rule.  Thank you for pointing it out.

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


More information about the Mlir-commits mailing list