[Mlir-commits] [mlir] [mlir][Interfaces] `ValueBoundsConstraintSet`: Add `dump` helper function (PR #86634)

Benjamin Maxwell llvmlistbot at llvm.org
Tue Mar 26 05:32:47 PDT 2024


================
@@ -715,6 +715,35 @@ ValueBoundsConstraintSet::areEquivalentSlices(MLIRContext *ctx,
   return true;
 }
 
+void ValueBoundsConstraintSet::dump() const {
+  llvm::errs() << "==========\nColumns:\n";
+  llvm::errs() << "(column\tdim\tvalue)\n";
+  for (auto it : llvm::enumerate(positionToValueDim)) {
----------------
MacDue wrote:

nit: You can use a structured binding rather than `it.value()` and `it.index()`.
```suggestion
  for (auto [index, valueDim] : llvm::enumerate(positionToValueDim)) {
```

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


More information about the Mlir-commits mailing list