Commit 8fc8c7e7 by Martin Liska Committed by Martin Liska

re PR middle-end/65665 (g++.dg/torture/pr64378.C -O2 -flto…

re PR middle-end/65665 (g++.dg/torture/pr64378.C   -O2 -flto -fno-use-linker-plugin -flto-partition=none)

Fix PR ipa/65665

	PR ipa/65665
	* ipa-icf.c (sem_function::equals_wpa): Verify that IPA CP
	has computed data structure.
	(sem_item_optimizer::update_hash_by_addr_refs): Likewise.

From-SVN: r221872
parent 7870a311
2015-04-05 Martin Liska <mliska@suse.cz>
PR ipa/65665
* ipa-icf.c (sem_function::equals_wpa): Verify that IPA CP
has computed data structure.
(sem_item_optimizer::update_hash_by_addr_refs): Likewise.
2015-04-04 Jan Hubicka <hubicka@ucw.cz>
* invoke.texi (inline-unit-growth): Increase growth to 20%
......
......@@ -535,7 +535,8 @@ sem_function::equals_wpa (sem_item *item,
&& (TREE_CODE (TREE_TYPE (decl)) == METHOD_TYPE
|| TREE_CODE (TREE_TYPE (item->decl)) == METHOD_TYPE)
&& (ipa_node_params_sum == NULL
|| ipa_is_param_used (IPA_NODE_REF (dyn_cast <cgraph_node *>(node)),
|| IPA_NODE_REF (get_node ())->descriptors.is_empty ()
|| ipa_is_param_used (IPA_NODE_REF (get_node ()),
0))
&& compare_polymorphic_p ())
{
......@@ -2501,14 +2502,15 @@ sem_item_optimizer::update_hash_by_addr_refs ()
m_items[i]->update_hash_by_addr_refs (m_symtab_node_map);
if (m_items[i]->type == FUNC)
{
cgraph_node *cnode = dyn_cast <cgraph_node *> (m_items[i]->node);
if (TREE_CODE (TREE_TYPE (m_items[i]->decl)) == METHOD_TYPE
&& contains_polymorphic_type_p
(method_class_type (TREE_TYPE (m_items[i]->decl)))
&& (DECL_CXX_CONSTRUCTOR_P (m_items[i]->decl)
|| ((ipa_node_params_sum == NULL
|| ipa_is_param_used (
IPA_NODE_REF
(dyn_cast <cgraph_node *>(m_items[i]->node)), 0))
|| IPA_NODE_REF (cnode)->descriptors.is_empty ()
|| ipa_is_param_used (IPA_NODE_REF (cnode), 0))
&& static_cast<sem_function *> (m_items[i])
->compare_polymorphic_p ())))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment