aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/types.ads
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2021-08-12 16:49:16 -0400
committerPierre-Marie de Rodat <derodat@adacore.com>2021-10-01 06:13:39 +0000
commit3f561db7ca1fba70a90c3ff9f7682b7841585258 (patch)
tree632c7498e7dd06afbfad5bc717c05f2a695f68b9 /gcc/ada/types.ads
parent3a81dbb618e3ac6cd42ac6f296a96296e099ac1f (diff)
downloadgcc-3f561db7ca1fba70a90c3ff9f7682b7841585258.zip
gcc-3f561db7ca1fba70a90c3ff9f7682b7841585258.tar.gz
gcc-3f561db7ca1fba70a90c3ff9f7682b7841585258.tar.bz2
[Ada] More work on efficiency improvements
gcc/ada/ * table.ads (Table_Type): Remove "aliased"; no longer needed by Atree. Besides it contradicted the comment a few lines above, "-- Note: We do not make the table components aliased...". * types.ads: Move type Slot to Atree. * atree.ads: Move type Slot fromt Types to here. Move type Node_Header from Seinfo to here. * atree.adb: Avoid the need for aliased components of the Slots table. Instead of 'Access, use a getter and setter. Misc cleanups. (Print_Statistics): Print statistics about node and entity kind frequencies. Give 3 digit fractions instead of percentages. * (Get_Original_Node_Count, Set_Original_Node_Count): Statistics for calls to Original_Node and Set_Original_Node. (Original_Node, Set_Original_Node): Gather statistics by calling the above. (Print_Field_Statistics): Print Original_Node statistics. (Update_Kind_Statistics): Remove, and put all statistics gathering under "if Atree_Statistics_Enabled", which is a flag generated in Seinfo by Gen_IL. * gen_il-gen.adb (Compute_Field_Offsets): Choose offsets of Nkind, Ekind, and Homonym first. This causes a slight efficiency improvement. Misc cleanups. Do not generate Node_Header; it is now hand-written in Atree. When choosing the order in which to assign offsets, weight by the frequency of the node type, so the more common nodes get their field offsets assigned earlier. Add more special cases. (Compute_Type_Sizes): Remove this and related things. There was a comment: "At some point we can instrument Atree to print out accurate size statistics, and remove this code." We have Atree statistics, so we now remove this code. (Put_Seinfo): Generate Atree_Statistics_Enabled, which is equal to Statistics_Enabled. This allows Atree to say "if Atree_Statistics_Enabled then <gather statistics>" for efficiency. When Atree_Statistics_Enabled is False, the "if ..." will be optimized away. * gen_il-internals.ads (Type_Frequency): New table of kind frequencies. * gen_il-internals.adb: Minor comment improvement. * gen_il-fields.ads: Remove unused subtypes. Suppress style checks in the Type_Frequency table. If we regenerate this table (see -gnatd.A) we don't want to have to fiddle with casing. * impunit.adb: Minor. * sinfo-utils.adb: Minor. * debug.adb: Minor comment improvement.
Diffstat (limited to 'gcc/ada/types.ads')
-rw-r--r--gcc/ada/types.ads4
1 files changed, 0 insertions, 4 deletions
diff --git a/gcc/ada/types.ads b/gcc/ada/types.ads
index 32194e8..673f7c6 100644
--- a/gcc/ada/types.ads
+++ b/gcc/ada/types.ads
@@ -1014,8 +1014,4 @@ package Types is
type Offset_Array is
array (Offset_Array_Index range <>) of Opt_Field_Offset;
- Slot_Size : constant := 32;
- type Slot is mod 2**Slot_Size;
- for Slot'Size use Slot_Size;
-
end Types;