public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-3850] [Ada] Follow-on efficiency improvements
@ 2021-09-23 13:09 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-09-23 13:09 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:c06539752d77126689ee49fc3e4a8add2a4980e3

commit r12-3850-gc06539752d77126689ee49fc3e4a8add2a4980e3
Author: Bob Duff <duff@adacore.com>
Date:   Fri Jul 30 16:49:37 2021 -0400

    [Ada] Follow-on efficiency improvements
    
    gcc/ada/
    
            * gen_il-gen.adb: Set the number of concrete nodes that have the
            Homonym field to a higher number than any other field. This
            isn't true, but it forces Homonym's offset to be chosen first,
            so it will be at offset zero and hence slot zero.

Diff:
---
 gcc/ada/gen_il-gen.adb | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gcc/ada/gen_il-gen.adb b/gcc/ada/gen_il-gen.adb
index 95fb526f5f2..2fbec00e548 100644
--- a/gcc/ada/gen_il-gen.adb
+++ b/gcc/ada/gen_il-gen.adb
@@ -1036,6 +1036,13 @@ package body Gen_IL.Gen is
             Append (All_Fields, F);
          end loop;
 
+         --  Force Homonym to be at offset zero, which speeds up the
+         --  compiler. The Sort below will place Homonym first in
+         --  All_Fields.
+
+         Num_Concrete_Have_Field (Homonym) :=
+           Num_Concrete_Have_Field (Nkind) + 1;
+
          --  Sort All_Fields based on how many concrete types have the field.
          --  This is for efficiency; we want to choose the offsets of the most
          --  common fields first, so they get low numbers.


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

only message in thread, other threads:[~2021-09-23 13:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-23 13:09 [gcc r12-3850] [Ada] Follow-on efficiency improvements 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).