From 90b41faf0d44ca470fab553861676218724621ca Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Tue, 16 Aug 2016 14:48:39 +0000 Subject: [PATCH] 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 --- clang/include/clang/AST/AttrIterator.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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. -- 2.7.4