<div dir="auto"><div>OK, thanks for the revert.<br><br><div class="gmail_quote"><div dir="ltr">On Wed, 23 May 2018, 01:28 Hans Wennborg via cfe-commits, <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We're hitting asserts after this in Chromium. I've filed PR37560 and<br>
reverted in r333067.<br>
<br>
On Wed, May 23, 2018 at 2:09 AM, Richard Smith via cfe-commits<br>
<<a href="mailto:cfe-commits@lists.llvm.org" target="_blank" rel="noreferrer">cfe-commits@lists.llvm.org</a>> wrote:<br>
> Author: rsmith<br>
> Date: Tue May 22 17:09:29 2018<br>
> New Revision: 333044<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=333044&view=rev" rel="noreferrer noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=333044&view=rev</a><br>
> Log:<br>
> Use zeroinitializer for (trailing zero portion of) large array initializers<br>
> more reliably.<br>
><br>
> Clang has two different ways it emits array constants (from InitListExprs and<br>
> from APValues), and both had some ability to emit zeroinitializer, but neither<br>
> was able to catch all cases where we could use zeroinitializer reliably. In<br>
> particular, emitting from an APValue would fail to notice if all the explicit<br>
> array elements happened to be zero. In addition, for large arrays where only an<br>
> initial portion has an explicit initializer, we would emit the complete<br>
> initializer (which could be huge) rather than emitting only the non-zero<br>
> portion. With this change, when the element would have a suffix of more than 8<br>
> zero elements, we emit the array constant as a packed struct of its initial<br>
> portion followed by a zeroinitializer constant for the trailing zero portion.<br>
><br>
> In passing, I found a bug where SemaInit would sometimes walk the entire array<br>
> when checking an initializer that only covers the first few elements; that's<br>
> fixed here to unblock testing of the rest.<br>
><br>
> Differential Revision: <a href="https://reviews.llvm.org/D47166" rel="noreferrer noreferrer" target="_blank">https://reviews.llvm.org/D47166</a><br>
><br>
> Modified:<br>
>     cfe/trunk/lib/CodeGen/CGExprConstant.cpp<br>
>     cfe/trunk/lib/Sema/SemaInit.cpp<br>
>     cfe/trunk/test/CodeGen/init.c<br>
>     cfe/trunk/test/CodeGenCXX/cxx11-initializer-aggregate.cpp<br>
>     cfe/trunk/test/SemaCXX/aggregate-initialization.cpp<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank" rel="noreferrer">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div></div></div>