[Ada] Improve efficiency of aggregates with <>
authorBob Duff <duff@adacore.com>
Tue, 20 Aug 2019 09:50:24 +0000 (09:50 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Tue, 20 Aug 2019 09:50:24 +0000 (09:50 +0000)
commitd4e4e88a4c1b13bc480603ad96672ce079e32ffb
treed80df430cc29541eb81fd0f218dd73c10d28f927
parentcf0e5ca723edbb63719ca075fce3f84eb8e43553
[Ada] Improve efficiency of aggregates with <>

The generated code has been improved so that aggregates with <> are more
efficient.  No change in behavior; no test.

2019-08-20  Bob Duff  <duff@adacore.com>

gcc/ada/

* exp_aggr.adb (Expand_Array_Aggregate): Use build-in-place in
the nonlimited case in STEP 4. This improves the efficiency of
things like (1 .. 1000 => <>).  We still generate some code for
that, unfortunately, but it is much improved.
(Aggr_Assignment_OK_For_Backend): Return false if <> components
are present.

From-SVN: r274739
gcc/ada/ChangeLog
gcc/ada/exp_aggr.adb