diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2015-01-20 20:48:59 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2015-01-20 19:48:59 +0000 |
commit | bb1e543c64ff31a2e5d6959b0e4260c507c45b5b (patch) | |
tree | 6e5c86ba08bd55d166385c9730c5ac85ac9810d0 /gcc/ipa-inline-transform.c | |
parent | 17cb42833c207240918de8279e171c834093565a (diff) | |
download | gcc-bb1e543c64ff31a2e5d6959b0e4260c507c45b5b.zip gcc-bb1e543c64ff31a2e5d6959b0e4260c507c45b5b.tar.gz gcc-bb1e543c64ff31a2e5d6959b0e4260c507c45b5b.tar.bz2 |
re PR lto/45375 ([meta-bug] Issues with building Mozilla (i.e. Firefox) with LTO)
PR lto/45375
* ipa-inline.c: Include lto-streamer.h
(report_inline_failed_reason): Output source file differences and
flags on optimization/target node mismatch.
(can_inline_edge_p): Consider caller to be the outer inline function;
be less restrictive about matching opimize and optimize_size attributes.
(inline_account_function_p): Break out from ...
(inline_small_functions): ... here.
* ipa-inline-transform.c (clone_inlined_nodes): Use
inline_account_function_p.
(inline_call): Use optimize attribution; use inline_account_function_p.
(inline_transform): Use opt_for_fn.
* ipa-inline.h (inline_account_function_p): Declare.
From-SVN: r219909
Diffstat (limited to 'gcc/ipa-inline-transform.c')
-rw-r--r-- | gcc/ipa-inline-transform.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/ipa-inline-transform.c b/gcc/ipa-inline-transform.c index 1c4b23a..235219d 100644 --- a/gcc/ipa-inline-transform.c +++ b/gcc/ipa-inline-transform.c @@ -214,8 +214,10 @@ clone_inlined_nodes (struct cgraph_edge *e, bool duplicate, cgraph_remove_unreachable_functions gets rid of them. */ gcc_assert (!e->callee->global.inlined_to); e->callee->dissolve_same_comdat_group_list (); - if (e->callee->definition && !DECL_EXTERNAL (e->callee->decl)) + if (e->callee->definition + && inline_account_function_p (e->callee)) { + gcc_assert (!e->callee->alias); if (overall_size) *overall_size -= inline_summaries->get (e->callee)->size; nfunctions_inlined++; @@ -330,7 +332,7 @@ inline_call (struct cgraph_edge *e, bool update_original, old_size = inline_summaries->get (to)->size; inline_merge_summary (e); - if (optimize) + if (opt_for_fn (e->caller->decl, optimize)) new_edges_found = ipa_propagate_indirect_call_infos (curr, new_edges); if (update_overall_summary) inline_update_overall_summary (to); @@ -361,8 +363,7 @@ inline_call (struct cgraph_edge *e, bool update_original, /* Account the change of overall unit size; external functions will be removed and are thus not accounted. */ - if (overall_size - && !DECL_EXTERNAL (to->decl)) + if (overall_size && inline_account_function_p (to)) *overall_size += new_size - old_size; ncalls_inlined++; @@ -509,7 +510,7 @@ inline_transform (struct cgraph_node *node) node->remove_all_references (); timevar_push (TV_INTEGRATION); - if (node->callees && (optimize || has_inline)) + if (node->callees && (opt_for_fn (node->decl, optimize) || has_inline)) todo = optimize_inline_calls (current_function_decl); timevar_pop (TV_INTEGRATION); |