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

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 9 02:10:38 PDT 2023


tbaeder added inline comments.


================
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.
----------------
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`.


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

https://reviews.llvm.org/D156027



More information about the cfe-commits mailing list