Commit 4bd5f767 by Jan Hubicka Committed by Jan Hubicka

ipa-icf-gimple.c (func_checker::compare_operand): Fix handling of OBJ_TYPE_REF.

	* ipa-icf-gimple.c (func_checker::compare_operand): Fix handling
	of OBJ_TYPE_REF.

From-SVN: r221086
parent c7a06bc1
2015-02-28 Jan Hubicka <hubicka@ucw.cz> 2015-02-28 Jan Hubicka <hubicka@ucw.cz>
* ipa-icf-gimple.c (func_checker::compare_operand): Fix handling
of OBJ_TYPE_REF.
2015-02-28 Jan Hubicka <hubicka@ucw.cz>
* ipa-icf.c (sem_function::merge): Fix handling of COMDAT. * ipa-icf.c (sem_function::merge): Fix handling of COMDAT.
(sem_variable::merge) Likewise. (sem_variable::merge) Likewise.
......
...@@ -448,18 +448,23 @@ func_checker::compare_operand (tree t1, tree t2) ...@@ -448,18 +448,23 @@ func_checker::compare_operand (tree t1, tree t2)
/* Virtual table call. */ /* Virtual table call. */
case OBJ_TYPE_REF: case OBJ_TYPE_REF:
{ {
x1 = TREE_OPERAND (t1, 0); if (!compare_ssa_name (OBJ_TYPE_REF_EXPR (t1), OBJ_TYPE_REF_EXPR (t2)))
x2 = TREE_OPERAND (t2, 0); return return_false ();
y1 = TREE_OPERAND (t1, 1); if (opt_for_fn (m_source_func_decl, flag_devirtualize)
y2 = TREE_OPERAND (t2, 1); && virtual_method_call_p (t1))
z1 = TREE_OPERAND (t1, 2); {
z2 = TREE_OPERAND (t2, 2); if (tree_to_uhwi (OBJ_TYPE_REF_TOKEN (t1))
!= tree_to_uhwi (OBJ_TYPE_REF_TOKEN (t2)))
ret = compare_ssa_name (x1, x2) return return_false_with_msg ("OBJ_TYPE_REF token mismatch");
&& compare_operand (y1, y2) if (!types_same_for_odr (obj_type_ref_class (t1),
&& compare_cst_or_decl (z1, z2); obj_type_ref_class (t2)))
return return_false_with_msg ("OBJ_TYPE_REF OTR type mismatch");
return return_with_debug (ret); if (!compare_ssa_name (OBJ_TYPE_REF_OBJECT (t1),
OBJ_TYPE_REF_OBJECT (t2)))
return return_false_with_msg ("OBJ_TYPE_REF object mismatch");
}
return return_with_debug (true);
} }
case IMAGPART_EXPR: case IMAGPART_EXPR:
case REALPART_EXPR: case REALPART_EXPR:
......
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