[Mlir-commits] [mlir] fb60b1f - [mlir] Decrease stack allocations in Presburger's Matrix

Tres Popp llvmlistbot at llvm.org
Tue Sep 13 04:22:05 PDT 2022


Author: Tres Popp
Date: 2022-09-13T13:21:41+02:00
New Revision: fb60b1f8597ca5e924c78cf4d46eed2422dfece4

URL: https://github.com/llvm/llvm-project/commit/fb60b1f8597ca5e924c78cf4d46eed2422dfece4
DIFF: https://github.com/llvm/llvm-project/commit/fb60b1f8597ca5e924c78cf4d46eed2422dfece4.diff

LOG: [mlir] Decrease stack allocations in Presburger's Matrix

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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Analysis/Presburger/Matrix.h b/mlir/include/mlir/Analysis/Presburger/Matrix.h
index e9251ba5d031c..c9fff4ae56839 100644
--- a/mlir/include/mlir/Analysis/Presburger/Matrix.h
+++ b/mlir/include/mlir/Analysis/Presburger/Matrix.h
@@ -190,7 +190,7 @@ class Matrix {
 
   /// 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


        


More information about the Mlir-commits mailing list