[PATCH] D54172: [AST] Pack ArraySubscriptExpr and CallExpr

Bruno Ricci via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 6 11:48:03 PST 2018


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

Use the newly available space in the bit-fields of `Stmt`
to store some data from `ArraySubscriptExpr` and `CallExpr`.
This saves a pointer for each of them (which is a lot given
how frequently `CallExpr` is used).

Additionally for `ArraySubscriptExpr` store a bit indicating
whether the LHS is the base of the array subscript expression,
instead of checking if the type of the RHS is an integer type during
each access. This removes an indirection during each access.


Repository:
  rC Clang

https://reviews.llvm.org/D54172

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54172.172810.patch
Type: text/x-patch
Size: 11748 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181106/f9980cde/attachment-0001.bin>


More information about the cfe-commits mailing list