[mlir] Decrease stack allocations in Presburger's Matrix
authorTres Popp <tpopp@google.com>
Tue, 13 Sep 2022 08:21:55 +0000 (10:21 +0200)
committerTres Popp <tpopp@google.com>
Tue, 13 Sep 2022 11:21:41 +0000 (13:21 +0200)
The class set a SmallVector stack allocation size to 64 elements which
is uncommonly large. These structures are then used extensively and
copied often in functions which led to stack frame sizes considered
excessively large for some use cases.

Differential Revision: https://reviews.llvm.org/D133761

mlir/include/mlir/Analysis/Presburger/Matrix.h

index e9251ba..c9fff4a 100644 (file)
@@ -190,7 +190,7 @@ private:
 
   /// Stores the data. data.size() is equal to nRows * nReservedColumns.
   /// data.capacity() / nReservedColumns is the number of reserved rows.
-  SmallVector<int64_t, 64> data;
+  SmallVector<int64_t, 16> data;
 };
 
 } // namespace presburger