From c91061e6b0e1a5ce9484decc9aa208ce00a9af57 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Mon, 2 Sep 2013 22:17:10 +0200 Subject: ipa-split.c (execute_split_functions): Split externally visible functions called once. * ipa-split.c (execute_split_functions): Split externally visible functions called once. * gcc.dg/tree-ssa/fnsplit-1.c: New testcase. From-SVN: r202185 --- gcc/ipa-split.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc/ipa-split.c') diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c index faf7c84..5c3ee4f 100644 --- a/gcc/ipa-split.c +++ b/gcc/ipa-split.c @@ -1537,7 +1537,9 @@ execute_split_functions (void) Note that we are not completely conservative about disqualifying functions called once. It is possible that the caller is called more then once and then inlining would still benefit. */ - if ((!node->callers || !node->callers->next_caller) + if ((!node->callers + /* Local functions called once will be completely inlined most of time. */ + || (!node->callers->next_caller && node->local.local)) && !node->symbol.address_taken && (!flag_lto || !node->symbol.externally_visible)) { -- cgit v1.1