[PATCH] D16801: [OpenMP] Change in initial size of DSAStackTy::StackTy
Liza Sakellari via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 2 04:14:52 PST 2016
esakella created this revision.
esakella added a subscriber: ABataev.
Hello,
I have made a small change in the initial size of the StackTy SmallVector of class DSAStackTy.
I reduced the initial size of this SmallVector from 64 elements to 4 elements, in order to improve the memory consumption during the creation of the Sema, whose constructor calls the Sema::InitDataSharingAttributesStack() function, which in turn creates a DSAStackTy.
After profiling Clang (I just gave it a simple source file to compile) before and after this change, the difference in memory consumption is up to almost 400 KB.
Would that change be acceptable?
Thank you,
Sakellari Elisavet
http://reviews.llvm.org/D16801
Files:
lib/Sema/SemaOpenMP.cpp
Index: lib/Sema/SemaOpenMP.cpp
===================================================================
--- lib/Sema/SemaOpenMP.cpp
+++ lib/Sema/SemaOpenMP.cpp
@@ -123,7 +123,7 @@
CancelRegion(false), AssociatedLoops(1), InnerTeamsRegionLoc() {}
};
- typedef SmallVector<SharingMapTy, 64> StackTy;
+ typedef SmallVector<SharingMapTy, 4> StackTy;
/// \brief Stack of used declaration and their data-sharing attributes.
StackTy Stack;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16801.46633.patch
Type: text/x-patch
Size: 454 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160202/e95b1780/attachment-0001.bin>
More information about the cfe-commits
mailing list