]> git.ipfire.org Git - thirdparty/gcc.git/commit
Couple of tweaks to help in LTO mode
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Fri, 8 May 2020 15:01:18 +0000 (17:01 +0200)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Fri, 8 May 2020 15:24:15 +0000 (17:24 +0200)
commitbb1ec4773a01e5bbb7cb6e2f53ea338a74a6797f
tree64f188f766e3f5bf2ddc105a7bc2e6f241f3f838
parentc900c70049965fad7fa02aa08f0ac3a67ab99b37
Couple of tweaks to help in LTO mode

The first tweak is to remove the TREE_OVERFLOW flag on INTEGER_CSTs
because it prevents them from being uniquized in LTO mode.

The second, unrelated tweak is to canonicalize the packable types made
by gigi so that at most one per type is present in the GENERIC IL.

* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Deal
with artificial maximally-sized types designed by access types.
* gcc-interface/utils.c (packable_type_hash): New structure.
(packable_type_hasher): Likewise.
(packable_type_hash_table): New hash table.
(init_gnat_utils): Initialize it.
(destroy_gnat_utils): Destroy it.
(packable_type_hasher::equal): New method.
(hash_packable_type): New static function.
(canonicalize_packable_type): Likewise.
(make_packable_type): Make sure not to use too small a type for the
size of the new fields.  Canonicalize the type if it is named.
gcc/ada/ChangeLog
gcc/ada/gcc-interface/decl.c
gcc/ada/gcc-interface/utils.c