Skip to content
Snippets Groups Projects
Commit 5d7cb14e authored by Aaron Ballman's avatar Aaron Ballman
Browse files

Reduce the number of allocations required for AST attributes. In test cases,...

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278812 91177308-0d34-0410-b5e6-96231b3b80d8
parent 58beb827
No related branches found
No related tags found
No related merge requests found
......@@ -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<Attr*, 2> AttrVec;
typedef SmallVector<const Attr*, 2> ConstAttrVec;
typedef SmallVector<Attr *, 4> AttrVec;
/// specific_attr_iterator - Iterates over a subrange of an AttrVec, only
/// providing attributes that are of a specific type.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment