diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2015-03-02 21:31:21 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2015-03-02 20:31:21 +0000 |
commit | 1af8bfe51613a7ba044d1e7cc8d3e244c6daf8bc (patch) | |
tree | ee0a53af265611768823eb755d621853a9759d70 /gcc/ipa-inline.c | |
parent | b91b562cf2764dc10ba00a9473287728a59c4443 (diff) | |
download | gcc-1af8bfe51613a7ba044d1e7cc8d3e244c6daf8bc.zip gcc-1af8bfe51613a7ba044d1e7cc8d3e244c6daf8bc.tar.gz gcc-1af8bfe51613a7ba044d1e7cc8d3e244c6daf8bc.tar.bz2 |
re PR lto/65130 (ICE with LTO on valid code on x86_64-linux-gnu)
PR ipa/65130
* ipa-inline.c (check_callers): Looks for recursion.
(inline_to_all_callers): Give up on uninlinable or recursive edges.
* ipa-inline-analysis.c (inline_summary_t::duplicate): Do not update
summary of inline clones.
(do_estimate_growth_1): Fix recursion check.
* gcc.dg/lto/pr65130_0.c: New testcase.
* gcc.dg/lto/pr65130_1.c: New testcase.
From-SVN: r221124
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r-- | gcc/ipa-inline.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index db77d12..0b38b4c 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -952,6 +952,8 @@ check_callers (struct cgraph_node *node, void *has_hot_call) return true; if (!can_inline_edge_p (e, true)) return true; + if (e->recursive_p ()) + return true; if (!(*(bool *)has_hot_call) && e->maybe_hot_p ()) *(bool *)has_hot_call = true; } @@ -2094,6 +2096,15 @@ inline_to_all_callers (struct cgraph_node *node, void *data) { struct cgraph_node *caller = node->callers->caller; + if (!can_inline_edge_p (node->callers, true) + || node->callers->recursive_p ()) + { + if (dump_file) + fprintf (dump_file, "Uninlinable call found; giving up.\n"); + *num_calls = 0; + return false; + } + if (dump_file) { fprintf (dump_file, |