[PATCH] D156027: [clang][Interp] Rework how initializers work

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 9 08:24:26 PDT 2023


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM!



================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:545-547
+      // TODO(perf): For int and bool types, we can probably just skip this
+      //   since we memset our Block*s to 0 and so we have the desired value
+      //   without this.
----------------
tbaeder wrote:
> aaron.ballman wrote:
> > We might be able to get away with this for floats as well (IIRC, all zero bits is +0 for any IEEE 754 float type, so at least some of the more common floats could probably do this). Same is true for any pointer type so long as it's not a member pointer type.
> IIRC doesn't work since floating point is represented using an `Floating`, which uses `APFloat`.
Ah true!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156027/new/

https://reviews.llvm.org/D156027



More information about the cfe-commits mailing list