/* Analysis used by inlining decision heuristics.
- Copyright (C) 2003-2019 Free Software Foundation, Inc.
+ Copyright (C) 2003-2020 Free Software Foundation, Inc.
Contributed by Jan Hubicka
This file is part of GCC.
node_context_cache_clear = 0;
}
-/* Return hints derrived from EDGE. */
+/* Return hints derived from EDGE. */
int
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;
nonspec_time = e->entry.nonspec_time;
hints = e->entry.hints;
if (flag_checking
+ && !opt_for_fn (callee->decl, flag_profile_partial_training)
&& !callee->count.ipa_p ())
{
sreal chk_time, chk_nonspec_time;
Take this into account. */
else if (DECL_COMDAT (node->decl)
&& node->can_remove_if_no_direct_calls_p ())
- return (info->size
- * (100 - param_comdat_sharing_probability)
- + 50) / 100;
+ {
+ int prob = opt_for_fn (node->decl, param_comdat_sharing_probability);
+ return (info->size * (100 - prob) + 50) / 100;
+ }
}
return 0;
}
-/* Estimate the growth caused by inlining NODE into all callees. */
+/* Estimate the growth caused by inlining NODE into all callers. */
int
estimate_growth (struct cgraph_node *node)