diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-28 12:00:32 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-28 12:00:32 +0000 |
commit | db2db13c84ac7d48062a1056a03cb24cb04aaf60 (patch) | |
tree | bb44264423c65bd2e325dd7398d14e341c3b013a /gcc/ipa-inline-analysis.c | |
parent | 1d0c11b81e44e87b391857fc4ea9af0d01a98047 (diff) | |
download | gcc-db2db13c84ac7d48062a1056a03cb24cb04aaf60.tar.gz |
* gcc.dg/ipa/inlinehint-3.c: New testcase.
* ipa-inline.c (edge_badness): Fix overflow.
(inline_small_functions): Initialize SCCs correctly.
(do_estimate_edge_time, do_estimate_edge_hints): Skip self
recursive functions in SCC hints.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192891 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-inline-analysis.c')
-rw-r--r-- | gcc/ipa-inline-analysis.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c index 8dd9c6927ed..3b56e7ae0a0 100644 --- a/gcc/ipa-inline-analysis.c +++ b/gcc/ipa-inline-analysis.c @@ -1375,6 +1375,9 @@ dump_inline_summary (FILE * f, struct cgraph_node *node) (int) s->estimated_self_stack_size); fprintf (f, " global stack: %i\n", (int) s->estimated_stack_size); + if (s->scc_no) + fprintf (f, " In SCC: %i\n", + (int) s->scc_no); for (i = 0; VEC_iterate (size_time_entry, s->entry, i, e); i++) @@ -3348,7 +3351,8 @@ do_estimate_edge_time (struct cgraph_edge *edge) VEC_index (edge_growth_cache_entry, edge_growth_cache, edge->uid).size = size + (size >= 0); if (inline_summary (to)->scc_no - && inline_summary (to)->scc_no == inline_summary (callee)->scc_no) + && inline_summary (to)->scc_no == inline_summary (callee)->scc_no + && !cgraph_edge_recursive_p (edge)) hints |= INLINE_HINT_same_scc; VEC_index (edge_growth_cache_entry, edge_growth_cache, edge->uid).hints = hints + 1; @@ -3439,7 +3443,8 @@ do_estimate_edge_hints (struct cgraph_edge *edge) VEC_free (tree, heap, known_binfos); VEC_free (ipa_agg_jump_function_p, heap, known_aggs); if (inline_summary (to)->scc_no - && inline_summary (to)->scc_no == inline_summary (callee)->scc_no) + && inline_summary (to)->scc_no == inline_summary (callee)->scc_no + && !cgraph_edge_recursive_p (edge)) hints |= INLINE_HINT_same_scc; return hints; } |