[AST] Pack CXXDependentScopeMemberExpr
authorBruno Ricci <riccibrun@gmail.com>
Tue, 8 Jan 2019 14:17:00 +0000 (14:17 +0000)
committerBruno Ricci <riccibrun@gmail.com>
Tue, 8 Jan 2019 14:17:00 +0000 (14:17 +0000)
commit2e6dc538be1a694ad569496b917c5e653ed21c1d
treee0407023bab922c4a3412c0566620e2e220f2b16
parentefb5ad1c58e2fe758af3fd2a2f9a8c1196552864
[AST] Pack CXXDependentScopeMemberExpr

Use the newly available space in the bit-fields of Stmt. Additionally store
FirstQualifierFoundInScope as a trailing object since it is most of the time
null (non-null for 2 of the 35446 CXXDependentScopeMemberExpr when parsing
all of Boost).

It would be possible to move the data for the nested-name-specifier to a
trailing object too to save another 2 pointers, however doing so did actually
regress the time taken to parse all of Boost slightly.

This saves 8 bytes + 1 pointer per CXXDependentScopeMemberExpr in the vast
majority of cases.

Differential Revision: https://reviews.llvm.org/D56367

Reviewed By: rjmccall

llvm-svn: 350625
clang/include/clang/AST/ExprCXX.h
clang/include/clang/AST/Stmt.h
clang/lib/AST/ExprCXX.cpp
clang/lib/Serialization/ASTReaderStmt.cpp
clang/lib/Serialization/ASTWriterStmt.cpp