[PATCH] D56367: [AST] Pack CXXDependentScopeMemberExpr

Bruno Ricci via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 6 15:05:46 PST 2019


riccibruno created this revision.
riccibruno added a reviewer: rjmccall.
riccibruno added a project: clang.
Herald added a subscriber: cfe-commits.

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.


Repository:
  rC Clang

https://reviews.llvm.org/D56367

Files:
  include/clang/AST/ExprCXX.h
  include/clang/AST/Stmt.h
  lib/AST/ExprCXX.cpp
  lib/Serialization/ASTReaderStmt.cpp
  lib/Serialization/ASTWriterStmt.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56367.180407.patch
Type: text/x-patch
Size: 21572 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190106/6e10c75a/attachment-0001.bin>


More information about the cfe-commits mailing list