diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2014-05-21 07:41:46 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2014-05-21 05:41:46 +0000 |
commit | 1bbb87c4b25c0366ce2a53713ea1a9c97136e7b1 (patch) | |
tree | 4b9f247bf7f2f748f5c2c735e1b8ccd0f27c1d99 /gcc/ipa-inline.c | |
parent | d5ce4663f3d2f1d6c102757a2bbcdf00c7e9b49e (diff) | |
download | gcc-1bbb87c4b25c0366ce2a53713ea1a9c97136e7b1.zip gcc-1bbb87c4b25c0366ce2a53713ea1a9c97136e7b1.tar.gz gcc-1bbb87c4b25c0366ce2a53713ea1a9c97136e7b1.tar.bz2 |
re PR bootstrap/60984 (AIX: gcc-4.9.0 bootstrap fails in stage-2)
PR bootstrap/60984
* ipa-inline-transform.c (inline_call): Use add CALLEE_REMOVED parameter.
* ipa-inline.c (inline_to_all_callers): If callee was removed; return.
(ipa_inline): Loop inline_to_all_callers until no more aliases are removed.
From-SVN: r210674
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r-- | gcc/ipa-inline.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 65e6533..176d7c6 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -1971,6 +1971,8 @@ static bool inline_to_all_callers (struct cgraph_node *node, void *data) { int *num_calls = (int *)data; + bool callee_removed = false; + while (node->callers && !node->global.inlined_to) { struct cgraph_node *caller = node->callers->caller; @@ -1987,7 +1989,7 @@ inline_to_all_callers (struct cgraph_node *node, void *data) inline_summary (node->callers->caller)->size); } - inline_call (node->callers, true, NULL, NULL, true); + inline_call (node->callers, true, NULL, NULL, true, &callee_removed); if (dump_file) fprintf (dump_file, " Inlined into %s which now has %i size\n", @@ -1997,8 +1999,10 @@ inline_to_all_callers (struct cgraph_node *node, void *data) { if (dump_file) fprintf (dump_file, "New calls found; giving up.\n"); - return true; + return callee_removed; } + if (callee_removed) + return true; } return false; } @@ -2244,8 +2248,9 @@ ipa_inline (void) int num_calls = 0; cgraph_for_node_and_aliases (node, sum_callers, &num_calls, true); - cgraph_for_node_and_aliases (node, inline_to_all_callers, - &num_calls, true); + while (cgraph_for_node_and_aliases (node, inline_to_all_callers, + &num_calls, true)) + ; remove_functions = true; } } |