diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2019-06-07 10:15:00 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2019-06-07 08:15:00 +0000 |
commit | 686a56a85d39750cd5c0c42f2ea747c8632e519e (patch) | |
tree | cc3b9894ef2bc23014230964b6d23de0f912bba7 /gcc/ipa-utils.h | |
parent | 06dd9b3d4e86b2c12ba55144147272ac05eeed40 (diff) | |
download | gcc-686a56a85d39750cd5c0c42f2ea747c8632e519e.zip gcc-686a56a85d39750cd5c0c42f2ea747c8632e519e.tar.gz gcc-686a56a85d39750cd5c0c42f2ea747c8632e519e.tar.bz2 |
common.opt (flto-odr-type-merging): Ignore.
* common.opt (flto-odr-type-merging): Ignore.
* invoke.texi (-flto-odr-type-merging): Remove.
* ipa-devirt.c (odr_vtable_hasher:odr_name_hasher): Remove.
(can_be_vtable_hashed_p): Remove.
(hash_odr_vtable): Remove.
(odr_vtable_hasher::hash): Remove.
(types_same_for_odr): Remove.
(types_odr_comparable): Remove.
(odr_vtable_hasher::equal): Remove.
(odr_vtable_hash_type, odr_vtable_hash): Remove.
(add_type_duplicate): Do not synchronize vtable and name hashtables.
(get_odr_type): Do not use vtable hash.
(dump_odr_type): Remove commented out code.
(build_type_inheritance_graph): Do not allocate vtable hash.
(rebuild_type_inheritance_graph): Do not delete vtable hash.
* ipa-utils.h (type_with_linkage_p): Drop vtable hash path.
(odr_type_p): Likewise.
* tree.c (need_assembler_name_p): Remove flag_lto_odr_type_mering
test.
From-SVN: r272037
Diffstat (limited to 'gcc/ipa-utils.h')
-rw-r--r-- | gcc/ipa-utils.h | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/gcc/ipa-utils.h b/gcc/ipa-utils.h index 77cf3d3d..4a39d4a 100644 --- a/gcc/ipa-utils.h +++ b/gcc/ipa-utils.h @@ -187,19 +187,14 @@ type_with_linkage_p (const_tree t) if (!TYPE_NAME (t) || TREE_CODE (TYPE_NAME (t)) != TYPE_DECL) return false; - /* To support -fno-lto-odr-type-merigng recognize types with vtables - to have linkage. */ - if (RECORD_OR_UNION_TYPE_P (t) - && TYPE_BINFO (t) && BINFO_VTABLE (TYPE_BINFO (t))) - return true; - - /* After free_lang_data was run and -flto-odr-type-merging we can recongize + /* After free_lang_data was run we can recongize types with linkage by presence of mangled name. */ if (DECL_ASSEMBLER_NAME_SET_P (TYPE_NAME (t))) return true; if (in_lto_p) return false; + /* We used to check for TYPE_STUB_DECL but that is set to NULL for forward declarations. */ @@ -243,23 +238,8 @@ odr_type_p (const_tree t) /* We do not have this information when not in LTO, but we do not need to care, since it is used only for type merging. */ gcc_checking_assert (in_lto_p || flag_lto); - - if (!type_with_linkage_p (t)) - return false; - - /* To support -fno-lto-odr-type-merging consider types with vtables ODR. */ - if (type_in_anonymous_namespace_p (t)) - return true; - - if (TYPE_NAME (t) && DECL_ASSEMBLER_NAME_SET_P (TYPE_NAME (t))) - { - /* C++ FE uses magic <anon> as assembler names of anonymous types. - verify that this match with type_in_anonymous_namespace_p. */ - gcc_checking_assert (strcmp ("<anon>", - IDENTIFIER_POINTER - (DECL_ASSEMBLER_NAME (TYPE_NAME (t))))); - return true; - } + return TYPE_NAME (t) && TREE_CODE (TYPE_NAME (t)) == TYPE_DECL + && DECL_ASSEMBLER_NAME_SET_P (TYPE_NAME (t)); return false; } |