[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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 9183 bytes
Desc: not available
More information about the cfe-commits