diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2019-11-30 17:56:45 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2019-11-30 16:56:45 +0000 |
commit | b74d8dc4cf11da599b5c18d77a5039bc800d6871 (patch) | |
tree | 83659a5fcbd25257a160c1e7d81f819e0650f566 /gcc/cgraphclones.c | |
parent | f9235a2bafb1ea078367b1b804fd73d5d849fcdc (diff) | |
download | gcc-b74d8dc4cf11da599b5c18d77a5039bc800d6871.zip gcc-b74d8dc4cf11da599b5c18d77a5039bc800d6871.tar.gz gcc-b74d8dc4cf11da599b5c18d77a5039bc800d6871.tar.bz2 |
cgraph.c (cgraph_node::dump): Dump unit_id and merged_extern_inline.
* cgraph.c (cgraph_node::dump): Dump unit_id and merged_extern_inline.
* cgraph.h (cgraph_node): Add unit_id and
merged_extern_inline.
(symbol_table): Add max_unit.
(symbol_table::symbol_table): Initialize it.
* cgraphclones.c (duplicate_thunk_for_node): Copy unit_id.
merged_comdat, merged_extern_inline.
(cgraph_node::create_clone): Likewise.
(cgraph_node::create_version_clone): Likewise.
* ipa-fnsummary.c (dump_ipa_call_summary): Dump info about cross module
calls.
* ipa-fnsummary.h (cross_module_call_p): New inline function.
* ipa-inline-analyssi.c (simple_edge_hints): Use it.
* ipa-inline.c (inline_small_functions): Likewise.
* lto-symtab.c (lto_cgraph_replace_node): Record merged_extern_inline;
copy merged_comdat and merged_extern_inline.
* lto-cgraph.c (lto_output_node): Stream out merged_comdat,
merged_extern_inline and unit_id.
(input_overwrite_node): Stream in these.
(input_cgraph_1): Set unit_base.
* lto-streamer.h (lto_file_decl_data): Add unit_base.
* symtab.c (symtab_node::make_decl_local): Record former_comdat.
* g++.dg/lto/inline-crossmodule-1.h: New testcase.
* g++.dg/lto/inline-crossmodule-1_0.C: New testcase.
* g++.dg/lto/inline-crossmodule-1_1.C: New testcase.
From-SVN: r278876
Diffstat (limited to 'gcc/cgraphclones.c')
-rw-r--r-- | gcc/cgraphclones.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cgraphclones.c b/gcc/cgraphclones.c index 9aacb0b..81c5dfd 100644 --- a/gcc/cgraphclones.c +++ b/gcc/cgraphclones.c @@ -234,6 +234,9 @@ duplicate_thunk_for_node (cgraph_node *thunk, cgraph_node *node) new_thunk->unique_name = in_lto_p; new_thunk->former_clone_of = thunk->decl; new_thunk->clone.param_adjustments = node->clone.param_adjustments; + new_thunk->unit_id = thunk->unit_id; + new_thunk->merged_comdat = thunk->merged_comdat; + new_thunk->merged_extern_inline = thunk->merged_extern_inline; cgraph_edge *e = new_thunk->create_edge (node, NULL, new_thunk->count); symtab->call_edge_duplication_hooks (thunk->callees, e); @@ -383,6 +386,9 @@ cgraph_node::create_clone (tree new_decl, profile_count prof_count, new_node->icf_merged = icf_merged; new_node->merged_comdat = merged_comdat; new_node->thunk = thunk; + new_node->unit_id = unit_id; + new_node->merged_comdat = merged_comdat; + new_node->merged_extern_inline = merged_extern_inline; if (param_adjustments) new_node->clone.param_adjustments = param_adjustments; @@ -888,6 +894,9 @@ cgraph_node::create_version_clone (tree new_decl, new_version->inlined_to = inlined_to; new_version->rtl = rtl; new_version->count = count; + new_version->unit_id = unit_id; + new_version->merged_comdat = merged_comdat; + new_version->merged_extern_inline = merged_extern_inline; for (e = callees; e; e=e->next_callee) if (!bbs_to_copy |