diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-02 20:17:10 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-02 20:17:10 +0000 |
commit | 8745ccbf183af1eba2d430f43519f4602bfb1ce8 (patch) | |
tree | 2a42e8797aec5db5e1df9c0cc6cd3628837a6036 /gcc/ipa-split.c | |
parent | c55448e773b9b6137c299056137a56732366369f (diff) | |
download | gcc-8745ccbf183af1eba2d430f43519f4602bfb1ce8.tar.gz |
* ipa-split.c (execute_split_functions): Split externally visible
functions called once.
* gcc.dg/tree-ssa/fnsplit-1.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202185 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-split.c')
-rw-r--r-- | gcc/ipa-split.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c index faf7c8480c9..5c3ee4fa2ce 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)) { |