diff options
author | Martin Liska <mliska@suse.cz> | 2015-01-12 10:59:39 +0100 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2015-01-12 09:59:39 +0000 |
commit | 1c928ddc69d2f9c9ff2105635a666d82c2e0ee98 (patch) | |
tree | 13b7da17f84e61fb821e0dc87f2fde1a971befe2 /gcc | |
parent | 76478bf94bb4e3027ecb132d88e416dcf5996371 (diff) | |
download | gcc-1c928ddc69d2f9c9ff2105635a666d82c2e0ee98.zip gcc-1c928ddc69d2f9c9ff2105635a666d82c2e0ee98.tar.gz gcc-1c928ddc69d2f9c9ff2105635a666d82c2e0ee98.tar.bz2 |
IPA ICF: handle correctly indirect_calls.
* ipa-icf.c (sem_function::equals_wpa): Add indirect_calls as indication
that a function is not leaf.
(sem_function::compare_polymorphic_p): Likewise.
From-SVN: r219456
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ipa-icf.c | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6c820cd..3205cec 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-01-12 Martin Liska <mliska@suse.cz> + + * ipa-icf.c (sem_function::equals_wpa): Add indirect_calls as indication + that a function is not leaf. + (sem_function::compare_polymorphic_p): Likewise. + 2015-01-12 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> * config/visium/visium.c: Add includes hashtab.h, hash-set.h, diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c index 4ccaf8c..9e2dea5 100644 --- a/gcc/ipa-icf.c +++ b/gcc/ipa-icf.c @@ -340,7 +340,8 @@ sem_function::equals_wpa (sem_item *item, return return_false_with_msg ("NULL argument type"); /* Polymorphic comparison is executed just for non-leaf functions. */ - bool is_not_leaf = get_node ()->callees != NULL; + bool is_not_leaf = get_node ()->callees != NULL + || get_node ()->indirect_calls != NULL; if (!func_checker::compatible_types_p (arg_types[i], m_compared_func->arg_types[i], @@ -884,7 +885,9 @@ bool sem_function::compare_polymorphic_p (void) { return get_node ()->callees != NULL - || m_compared_func->get_node ()->callees != NULL; + || get_node ()->indirect_calls != NULL + || m_compared_func->get_node ()->callees != NULL + || m_compared_func->get_node ()->indirect_calls != NULL; } /* For a given call graph NODE, the function constructs new |