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
This commit is contained in:
Martin Liska 2015-01-12 10:59:39 +01:00 committed by Martin Liska
parent 76478bf94b
commit 1c928ddc69
2 changed files with 11 additions and 2 deletions

View File

@ -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,

View File

@ -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