On 6/12/19 7:07 AM, Richard Biener wrote:
On Tue, 11 Jun 2019, Jason Merrill wrote:
On Tue, Jun 11, 2019, 6:45 AM Richard Biener <rguent...@suse.de> wrote:
The following fixes the documented(!) quadraticness in
split_nonconstant_init_1 by simply marking to be removed
constructor elements and doing that in a second run over
the constructor.
More micro-optimizing would be possible by recording the
first removed element index and special-casing removing
of a single element. If you think that's worth the extra
complexity I can work on that (hopefully the case we
increase num_split_elts but not actually split is a bug...).
Bootstrap / regtest running on x86_64-unknown-linux-gnu.
OK if that passes?
Ok, thanks.
Installed.
Below is the simplest variant re-adding optimized handling
of single-element removal. Note the second hunk which
moves the num_split_elts increment so it doesn't happen
when split_nonconstant_init_1 returns false.
Bootstrapped and tested on x86_64-unknown-linux-gnu.
OK?
OK.
Jason