[clang] [clang][Interp] Only evaluate the source array initialization of an `ArrayInitLoopExpr` once (PR #68039)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 18 23:20:03 PDT 2023


================
@@ -810,9 +810,7 @@ bool ByteCodeExprGen<Emitter>::VisitArrayInitLoopExpr(
     const ArrayInitLoopExpr *E) {
   assert(Initializing);
   assert(!DiscardResult);
-  // TODO: This compiles to quite a lot of bytecode if the array is larger.
-  //   Investigate compiling this to a loop, or at least try to use
-  //   the AILE's Common expr.
----------------
tbaederr wrote:

Removing the entire comment is not correct; it still compiles to a lot of code for larger arrays. Removing the AILE part of the comment is fine though.

https://github.com/llvm/llvm-project/pull/68039


More information about the cfe-commits mailing list