[PATCH] D56358: [AST] Move back BasePathSize to the bit-fields of CastExpr
Bruno Ricci via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 5 13:05:32 PST 2019
riccibruno created this revision.
riccibruno added a reviewer: lebedev.ri.
riccibruno added a project: clang.
Herald added a subscriber: cfe-commits.
Background:
The number of trailing `CXXBaseSpecifiers` in `CastExpr` was moved from
`CastExprBitfields` to a trailing object in r338489 (D50050 <https://reviews.llvm.org/D50050>). At this time these bit-fields
classes were only 32 bits wide. However later r345459 widened these bit-field classes to 64 bits.
The reason for this change was that on 64 bit archs alignment requirements caused 4 bytes of
padding after the `Stmt` sub-object in nearly all expression classes. Reusing this padding yielded
an >10% reduction in the size used by all statement/expressions when parsing all of Boost (on a
64 bit arch). This increased the size of statement/expressions for 32 bits archs, but this can be
mitigated by moving more data to the bit-fields of `Stmt` (and moreover most people now care
about 64 bits archs as a host).
Therefore move back the number of `CXXBaseSpecifiers` in `CastExpr` to the bit-fields of `Stmt`.
This in effect mostly revert r338489 while keeping the added test.
Repository:
rC Clang
https://reviews.llvm.org/D56358
Files:
include/clang/AST/Expr.h
include/clang/AST/ExprCXX.h
include/clang/AST/ExprObjC.h
include/clang/AST/Stmt.h
lib/AST/Expr.cpp
lib/AST/ExprCXX.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56358.180377.patch
Type: text/x-patch
Size: 16924 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190105/c42ad56e/attachment-0001.bin>
More information about the cfe-commits
mailing list