Commit 686a56a8 by Jan Hubicka Committed by Jan Hubicka

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
parent 06dd9b3d
2019-06-07 Jan Hubicka <hubicka@ucw.cz>
* 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.
2019-06-07 Jan Hubicka <hubicka@ucw.cz>
* tree-ssa-alias.c (aliasing_component_refs_p): Do not give up
immediately after same_types_for_tbaa_p returns -1 and continue
looking for possible exact match; if matching types are arrays
......
......@@ -1888,8 +1888,8 @@ Common Joined RejectNegative UInteger Var(flag_lto_compression_level) Init(-1) I
-flto-compression-level=<number> Use zlib compression level <number> for IL.
flto-odr-type-merging
Common Report Var(flag_lto_odr_type_mering) Init(1)
Merge C++ types using One Definition Rule.
Common Ignore
Does nothing. Preserved for backward compatibility.
flto-report
Common Report Var(flag_lto_report) Init(0)
......
......@@ -7357,7 +7357,7 @@ Do not warn about compile-time overflow in constant expressions.
@opindex Wno-odr
@opindex Wodr
Warn about One Definition Rule violations during link-time optimization.
Requires @option{-flto-odr-type-merging} to be enabled. Enabled by default.
Enabled by default.
@item -Wopenmp-simd
@opindex Wopenmp-simd
......@@ -10353,12 +10353,6 @@ The value @samp{one} specifies that exactly one partition should be
used while the value @samp{none} bypasses partitioning and executes
the link-time optimization step directly from the WPA phase.
@item -flto-odr-type-merging
@opindex flto-odr-type-merging
Enable streaming of mangled types names of C++ types and their unification
at link time. This increases size of LTO object files, but enables
diagnostics about One Definition Rule violations.
@item -flto-compression-level=@var{n}
@opindex flto-compression-level
This option specifies the level of compression used for intermediate
......@@ -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;
}
......
......@@ -5590,8 +5590,7 @@ need_assembler_name_p (tree decl)
if (TREE_CODE (decl) == TYPE_DECL)
{
if (flag_lto_odr_type_mering
&& DECL_NAME (decl)
if (DECL_NAME (decl)
&& decl == TYPE_NAME (TREE_TYPE (decl))
&& TYPE_MAIN_VARIANT (TREE_TYPE (decl)) == TREE_TYPE (decl)
&& !TYPE_ARTIFICIAL (TREE_TYPE (decl))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment