[PATCH] D48661: [Fixed Point Arithmetic] Fixed Point Constant

Bruno Ricci via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 7 08:35:23 PDT 2018


bricci added a comment.

Just to provide a bit of additional context:

My comment about fsyntax-only is not specific to fsyntax-only.
This is just an handy way to benchmark the frontend without noise
from LLVM. It is important to keep all frequently used structures small
(within reason) even if this result in a little bit of additional work to pack/unpack
(again, within reason) since the front-end is not doing a lot of computations
but is doing a lot of memory accesses.

On my machine when I do an fsyntax-only on all of Boost
~25% of the cycles are spent with execution stalled because of
a cache miss.

Now this basic fixed point type will potentially ends up in
the Type/Stmt/Decl hierarchy -> it *must* be small.

For another example of what not to do see APSInt which
stores a single bool, thus wasting 8 bytes on 64 bits archs
just for this single bit. I actually have a patch stuffing it into APInt
but have not bothered to upstream it since in this case it do not
really matter for clang.


Repository:
  rL LLVM

https://reviews.llvm.org/D48661





More information about the cfe-commits mailing list