[PATCH] D54321: [AST] Store the expressions in ParenListExpr in a trailing array

Bruno Ricci via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 9 08:38:24 PST 2018


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

Use the newly available space in the bit-fields of `Stmt`, and store
the expressions in `ParenListExpr` in a trailing array past `ParenListExpr`.
This saves 2 pointers per `ParenListExpr`. Additionally remove the branches
in the loop used to set the bits `TypeDependent`, `ValueDependent`,
`InstantiationDependent` and `ContainsUnexpandedParameterPack`,
and just access the bit-fields once at the end instead of during each iteration.


Repository:
  rC Clang

https://reviews.llvm.org/D54321

Files:
  include/clang/AST/Expr.h
  include/clang/AST/Stmt.h
  lib/AST/ASTImporter.cpp
  lib/AST/Expr.cpp
  lib/Sema/SemaCoroutine.cpp
  lib/Sema/SemaDeclCXX.cpp
  lib/Sema/SemaExpr.cpp
  lib/Serialization/ASTReaderStmt.cpp
  lib/Serialization/ASTWriterStmt.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54321.173342.patch
Type: text/x-patch
Size: 11865 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181109/b7e80ea9/attachment.bin>


More information about the cfe-commits mailing list