From: Aaron Ballman Date: Tue, 16 Aug 2016 14:48:39 +0000 (+0000) Subject: Reduce the number of allocations required for AST attributes. In test cases, the... X-Git-Tag: llvmorg-4.0.0-rc1~12321 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=90b41faf0d44ca470fab553861676218724621ca;p=platform%2Fupstream%2Fllvm.git Reduce the number of allocations required for AST attributes. In test cases, the max resident memory changed from 65760k to 64476k which is 1.9% improvement. Allocations in grow_pod changed from 8847 to 4872 according to tcmalloc heap profiler. Overall running time remained the same. Patch by Eugene Kosov llvm-svn: 278812 --- diff --git a/clang/include/clang/AST/AttrIterator.h b/clang/include/clang/AST/AttrIterator.h index a0c8030..fb9b049 100644 --- a/clang/include/clang/AST/AttrIterator.h +++ b/clang/include/clang/AST/AttrIterator.h @@ -39,8 +39,7 @@ void operator delete[](void *Ptr, const clang::ASTContext &C, size_t); namespace clang { /// AttrVec - A vector of Attr, which is how they are stored on the AST. -typedef SmallVector AttrVec; -typedef SmallVector ConstAttrVec; +typedef SmallVector AttrVec; /// specific_attr_iterator - Iterates over a subrange of an AttrVec, only /// providing attributes that are of a specific type.