public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Bump size limit for large static aggregates
@ 2017-11-09 13:16 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2017-11-09 13:16 UTC (permalink / raw)
  To: gcc-patches; +Cc: Eric Botcazou

[-- Attachment #1: Type: text/plain, Size: 613 bytes --]

For historical reasons, the compiler caps the size of large static aggregates
that are emitted as static data in the object file.  If they exceed the cap,
then elaboration code is generated instead, but this is in most cases slower,
yields bigger and unoptimizable code with poor run-time performance.

This change bumps the limit by an order of magnitude to account for larger
aggregates used in modern software.  No functional changes.

Tested on x86_64-pc-linux-gnu, committed on trunk

2017-11-09  Eric Botcazou  <ebotcazou@adacore.com>

	* exp_aggr.adb (Aggr_Size_OK): Bump base limit from 50000 to 500000.


[-- Attachment #2: difs --]
[-- Type: text/plain, Size: 929 bytes --]

Index: exp_aggr.adb
===================================================================
--- exp_aggr.adb	(revision 254579)
+++ exp_aggr.adb	(revision 254580)
@@ -428,7 +428,7 @@
    --  Start of processing for Aggr_Size_OK
 
    begin
-      --  The normal aggregate limit is 50000, but we increase this limit to
+      --  The normal aggregate limit is 500000, but we increase this limit to
       --  2**24 (about 16 million) if Restrictions (No_Elaboration_Code) or
       --  Restrictions (No_Implicit_Loops) is specified, since in either case
       --  we are at risk of declaring the program illegal because of this
@@ -448,7 +448,7 @@
       --  Finally, we use a small limit in CodePeer mode where we favor loops
       --  instead of thousands of single assignments (from large aggregates).
 
-      Max_Aggr_Size := 50000;
+      Max_Aggr_Size := 500000;
 
       if CodePeer_Mode then
          Max_Aggr_Size := 100;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-11-09 13:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-09 13:16 [Ada] Bump size limit for large static aggregates Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).