]> granicus.if.org Git - clang/commit
[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)
commite4d246c86329b82b8017e9a540279f07c8bb54ab
tree5ead294540a6004a66406ee879584959d0d35a32
parent1ad54e198af85c779c11a265af0737772300051d
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350625 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/ExprCXX.h
include/clang/AST/Stmt.h
lib/AST/ExprCXX.cpp
lib/Serialization/ASTReaderStmt.cpp
lib/Serialization/ASTWriterStmt.cpp