[Mlir-commits] [mlir] [mlir][sparse] use shared value storage between wrapped iterator and the wrapper. (PR #80046)

Aart Bik llvmlistbot at llvm.org
Tue Jan 30 11:18:41 PST 2024


================
@@ -219,7 +243,16 @@ class SparseIterator {
   // For trivial iterators, it is the position; for dedup iterators, it consists
   // of the positon and the segment high, for non-empty subsection iterator, it
   // is the metadata that specifies the subsection.
-  MutableArrayRef<Value> itVals;
+  //
+  // Note that the wrapped iterator shares the same storage to maintain itVals
+  // with it wrapper, which means the wrapped iterator might only owns a subset
+  // of all the values stored in itValStorage.
+  const unsigned itValsCnt;
+  SmallVectorImpl<Value> &itValsStorageRef;
+  // All other (loop invariant) values used by the iterator. Although these
+  // values are not updated between loop iteration, they still need to be passed
----------------
aartbik wrote:

between loop iterations (plural)

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


More information about the Mlir-commits mailing list