[PATCH] D54324: [AST] Store the value of CharacterLiteral inline if possible
Bruno Ricci via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 9 08:51:27 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.
The vast majority of `CharacterLiteral`s have a value which fits into 8 bits
(in the 2666 `CharacterLiteral`s in all of Boost, only 2 don't).
When possible, use the space in the bit-fields of `Stmt` to store the value
and otherwise store it in a trailing object.
This saves 1 pointer per `CharacterLiteral` when the value fits into 8 bits.
Note that in itself this do not save that much space, but this is part of
a larger effort to pack the statements/expressions classes.
Repository:
rC Clang
https://reviews.llvm.org/D54324
Files:
include/clang/AST/Expr.h
include/clang/AST/Stmt.h
lib/AST/ASTImporter.cpp
lib/AST/Expr.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/SemaTemplate.cpp
lib/Serialization/ASTReaderStmt.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54324.173349.patch
Type: text/x-patch
Size: 9183 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181109/ba0f0dab/attachment-0001.bin>
More information about the cfe-commits
mailing list