[PATCH] D155955: [Clang] Improve the handling of large arrays evaluation.

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 24 09:00:30 PDT 2023


efriedma added a comment.

The UINT_MAX thing seems like a straightforward bug; if we have time to fix it properly, I'd prefer not to add weird workarounds.

The release note says "unless they are part of a constant expression", but I don't see any code in the implementation that distinguishes folding from constant expression evaluation.  Unless this is just referring to the fact that bailing out of folding doesn't produce an error?  We might want to consider using a stricter bound for optional folding, though.

How likely is it that we could add some sort of optimization for new expressions so we don't represent each element separately in memory?  I know there's no solution in general, but in the cases people actually care about, all/almost all the elements are identical.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155955



More information about the cfe-commits mailing list