+2014-06-26 Martin Jambor <mjambor@suse.cz>
+
+ * ipa-prop.c (ipa_impossible_devirt_target): No longer static,
+ renamed to ipa_impossible_devirt_target. Fix typo.
+ * ipa-prop.h (ipa_impossible_devirt_target): Declare.
+ * ipa-cp.c (ipa_get_indirect_edge_target_1): Use
+ ipa_impossible_devirt_target.
+
2014-06-26 Richard Biener <rguenther@suse.de>
PR tree-optimization/61607
&& DECL_FUNCTION_CODE (target) == BUILT_IN_UNREACHABLE)
|| !possible_polymorphic_call_target_p
(ie, cgraph_get_node (target)))
- {
- if (dump_file)
- fprintf (dump_file,
- "Type inconsident devirtualization: %s/%i->%s\n",
- ie->caller->name (), ie->caller->order,
- IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (target)));
- target = builtin_decl_implicit (BUILT_IN_UNREACHABLE);
- cgraph_get_create_node (target);
- }
+ target = ipa_impossible_devirt_target (ie, target);
return target;
}
}
if (targets.length () == 1)
target = targets[0]->decl;
else
- target = builtin_decl_implicit (BUILT_IN_UNREACHABLE);
+ target = ipa_impossible_devirt_target (ie, NULL_TREE);
}
else
{
if (target && !possible_polymorphic_call_target_p (ie,
cgraph_get_node (target)))
- {
- if (dump_file)
- fprintf (dump_file,
- "Type inconsident devirtualization: %s/%i->%s\n",
- ie->caller->name (), ie->caller->order,
- IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (target)));
- target = builtin_decl_implicit (BUILT_IN_UNREACHABLE);
- cgraph_get_create_node (target);
- }
+ target = ipa_impossible_devirt_target (ie, target);
return target;
}
/* Return the target to be used in cases of impossible devirtualization. IE
and target (the latter can be NULL) are dumped when dumping is enabled. */
-static tree
-impossible_devirt_target (struct cgraph_edge *ie, tree target)
+tree
+ipa_impossible_devirt_target (struct cgraph_edge *ie, tree target)
{
if (dump_file)
{
if (target)
fprintf (dump_file,
- "Type inconsident devirtualization: %s/%i->%s\n",
+ "Type inconsistent devirtualization: %s/%i->%s\n",
ie->caller->name (), ie->caller->order,
IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (target)));
else
&& DECL_FUNCTION_CODE (target) == BUILT_IN_UNREACHABLE)
|| !possible_polymorphic_call_target_p
(ie, cgraph_get_node (target)))
- target = impossible_devirt_target (ie, target);
+ target = ipa_impossible_devirt_target (ie, target);
return ipa_make_edge_direct_to_target (ie, target);
}
}
if (targets.length () == 1)
target = targets[0]->decl;
else
- target = impossible_devirt_target (ie, NULL_TREE);
+ target = ipa_impossible_devirt_target (ie, NULL_TREE);
}
else
{
if (target)
{
if (!possible_polymorphic_call_target_p (ie, cgraph_get_node (target)))
- target = impossible_devirt_target (ie, target);
+ target = ipa_impossible_devirt_target (ie, target);
return ipa_make_edge_direct_to_target (ie, target);
}
else
struct cgraph_edge *ipa_make_edge_direct_to_target (struct cgraph_edge *, tree);
tree ipa_binfo_from_known_type_jfunc (struct ipa_jump_func *);
tree ipa_intraprocedural_devirtualization (gimple);
+tree ipa_impossible_devirt_target (struct cgraph_edge *, tree);
/* Functions related to both. */
void ipa_analyze_node (struct cgraph_node *);
+2014-06-26 Martin Jambor <mjambor@suse.cz>
+
+ * g++.dg/ipa/pr60600.C: Fix typo.
+ * g++.dg/ipa/devirt-25.C: Likewise.
+
2014-06-26 Richard Biener <rguenther@suse.de>
PR tree-optimization/61607
dpr_Job jobL;
dpr_run(jobL);
}
-/* { dg-final { scan-ipa-dump "Type inconsident devirtualization" "cp" } } */
+/* { dg-final { scan-ipa-dump "Type inconsistent devirtualization" "cp" } } */
/* { dg-final { cleanup-ipa-dump "cp" } } */
test(d);
}
-/* { dg-final { scan-ipa-dump "Type inconsident devirtualization" "cp" } } */
+/* { dg-final { scan-ipa-dump "Type inconsistent devirtualization" "cp" } } */
/* { dg-final { cleanup-ipa-dump "cp" } } */