aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-inline-analysis.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2019-11-30 16:56:45 +0000
committerJan Hubicka <hubicka@ucw.cz>2019-11-30 16:56:45 +0000
commitd7183b19a0ba22e98277a19782c0ca3868722cd3 (patch)
tree83659a5fcbd25257a160c1e7d81f819e0650f566 /gcc/ipa-inline-analysis.c
parent1fc1082929c645e1b2fec96a50ca9a47c81e0ca0 (diff)
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278876 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-inline-analysis.c')
-rw-r--r--gcc/ipa-inline-analysis.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c
index ae8e5db3d9c..75c6399d35d 100644
--- a/gcc/ipa-inline-analysis.c
+++ b/gcc/ipa-inline-analysis.c
@@ -163,9 +163,7 @@ simple_edge_hints (struct cgraph_edge *edge)
if (to_scc_no && to_scc_no == callee_scc_no && !edge->recursive_p ())
hints |= INLINE_HINT_same_scc;
- if (callee->lto_file_data && edge->caller->lto_file_data
- && edge->caller->lto_file_data != callee->lto_file_data
- && !callee->merged_comdat && !callee->icf_merged)
+ if (cross_module_call_p (edge))
hints |= INLINE_HINT_cross_module;
return hints;