diff options
author | Bob Duff <duff@adacore.com> | 2021-07-30 16:49:37 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-09-23 13:06:14 +0000 |
commit | c06539752d77126689ee49fc3e4a8add2a4980e3 (patch) | |
tree | c9d18619d19cb4e2690c86ae7af8168c2caf7521 /gcc/ada/gen_il-gen.adb | |
parent | fb3f21a3df8062a7a209b385aae377de2d8c093e (diff) | |
download | gcc-c06539752d77126689ee49fc3e4a8add2a4980e3.zip gcc-c06539752d77126689ee49fc3e4a8add2a4980e3.tar.gz gcc-c06539752d77126689ee49fc3e4a8add2a4980e3.tar.bz2 |
[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.
Diffstat (limited to 'gcc/ada/gen_il-gen.adb')
-rw-r--r-- | gcc/ada/gen_il-gen.adb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/gen_il-gen.adb b/gcc/ada/gen_il-gen.adb index 95fb526..2fbec00 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. |