[Ada] Improve run-time performance for large initialized allocators
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 4 May 2020 17:56:28 +0000 (19:56 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 6 Jul 2020 11:34:52 +0000 (07:34 -0400)
commit2fedcc18cb4a3c2dec2c658a975deb30cc821537
treee41691de80af1df11bb6247b6170cef19f54e7fa
parent60e010e7f39b10bbc8e8b5d8a956335c5b42b39e
[Ada] Improve run-time performance for large initialized allocators

gcc/ada/

* exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Move to library
level and use a new predicate Is_OK_Aggregate to recognize the
aggregates suitable for direct assignment by the back-end.
(Convert_Array_Aggr_In_Allocator): If neither in CodePeer mode nor
generating C code, generate a direct assignment instead of further
expanding if Aggr_Assignment_OK_For_Backend returns true.
gcc/ada/exp_aggr.adb