Fix profiledbootstrap with release checking
Jan Hubicka
hubicka@ucw.cz
Fri Jan 16 00:45:00 GMT 2015
Hi,
can_remove_node_now_p assumes that the node in question has no direct calls, this
however is not checked in inline_call that leads to alias to be removed from
comdat group while it should not.
Bootstrapped/regtested x86_64-linux, comitted.
Honza
PR ipa/64612
* ipa-inline-transform.c (can_remove_node_now_p): Fix handling
of comdat locals.
(inline_call): Fix removal of aliases.
Index: ipa-inline-transform.c
===================================================================
--- ipa-inline-transform.c (revision 219674)
+++ ipa-inline-transform.c (working copy)
@@ -139,7 +139,7 @@ can_remove_node_now_p (struct cgraph_nod
/* When we see same comdat group, we need to be sure that all
items can be removed. */
- if (!node->same_comdat_group)
+ if (!node->same_comdat_group || !node->externally_visible)
return true;
for (next = dyn_cast<cgraph_node *> (node->same_comdat_group);
next != node; next = dyn_cast<cgraph_node *> (next->same_comdat_group))
@@ -310,7 +310,8 @@ inline_call (struct cgraph_edge *e, bool
while (alias && alias != callee)
{
if (!alias->callers
- && can_remove_node_now_p (alias, e))
+ && can_remove_node_now_p (alias,
+ !e->next_caller && !e->prev_caller ? e : NULL))
{
next_alias = alias->get_alias_target ();
alias->remove ();
More information about the Gcc-patches
mailing list