/* Callgraph based intraprocedural optimizations.
- Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
Contributed by Jan Hubicka
This file is part of GCC.
memset (&node->rtl, 0, sizeof (node->rtl));
node->analyzed = false;
node->local.redefined_extern_inline = true;
- while (node->callees)
- cgraph_remove_edge (node->callees);
+
+ if (!flag_unit_at_a_time)
+ {
+ struct cgraph_node *n;
+
+ for (n = cgraph_nodes; n; n = n->next)
+ if (n->global.inlined_to == node)
+ cgraph_remove_node (n);
+ }
+
+ cgraph_node_remove_callees (node);
/* We may need to re-queue the node for assembling in case
we already proceeded it and ignored as not needed. */
DECL_INITIAL (node->decl) = error_mark_node;
/* Eliminate all call edges. This is important so the call_expr no longer
points to the dead function body. */
- while (node->callees)
- cgraph_remove_edge (node->callees);
+ cgraph_node_remove_callees (node);
}
}
DECL_STRUCT_FUNCTION (node->decl) = NULL;
DECL_INITIAL (node->decl) = error_mark_node;
}
- while (node->callees)
- cgraph_remove_edge (node->callees);
+ cgraph_node_remove_callees (node);
node->analyzed = false;
}
else