adamcz added a comment.
Sorry for trouble, I will revert this for now.
It's only the test that's causing the problem, the fix is fine, as far as I can
tell. Still, better revert the whole thing for now.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org
thakis added a comment.
The test is failing on non-arm macs: http://45.33.8.238/mac/38601/step_7.txt
Please take a look and revert for now if it takes a while to fix.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113120/new/
https://reviews.llvm.o
This revision was automatically updated to reflect the committed changes.
Closed by commit rG48bb5f4cbe8d: [clang] Add early exit when checking for const
init of arrays. (authored by adamcz).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113120/new/
kadircet accepted this revision.
kadircet added a comment.
This revision is now accepted and ready to land.
thanks, lgtm!
Comment at: clang/lib/AST/ExprConstant.cpp:10617
+// copying the data, which is wasteful.
+for (const unsigned N : {1u, FinalSize}) {
+ unsigne
adamcz added inline comments.
Comment at: clang/lib/AST/ExprConstant.cpp:10617
+// copying the data, which is wasteful.
+for (const unsigned N : {1u, FinalSize}) {
+ unsigned OldElts = Value->getArrayInitializedElts();
kadircet wrote:
> maybe unroll
adamcz updated this revision to Diff 385102.
adamcz marked an inline comment as done.
adamcz added a comment.
review comments
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113120/new/
https://reviews.llvm.org/D113120
Files:
clang/lib/AST/ExprCon
kadircet added a comment.
thanks this looks amazing! i am also not an expert in these parts of the code
but AFAICT the proposed behavior is in line with the contract. i am a little
worried about the cost of extra copy (especially when there are only a handful
of elements), but it should be prob
adamcz added a comment.
Hey Kadir. This is my naive approach at solving that large memory usage issue
you reported. It works, although I wish this was more generic. I'm not an
expert on this piece of code, so I tried to keep things similar to how they
worked previously. Let me know what you thi
adamcz created this revision.
adamcz added a reviewer: kadircet.
adamcz requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Before this commit, on code like:
struct S { ... };
S arr[1000];
while checking if arr is constexpr, clang wou