+2004-09-17 Jan Hubicka <jh@suse.cz>
+
+ PR tree-optimization/17509
+ * tree-optimize.c (update_inlined_to_pointers): New function.
+ (tree_rest_of_compilation): Use it.
+
2004-09-17 Devang Patel <dpatel@apple.com>
* dbxout.c (get_lang_number): New.
}
while (pass);
}
+\f
+
+/* update recursivly all inlined_to pointers of functions
+ inlined into NODE to INLINED_TO. */
+static void
+update_inlined_to_pointers (struct cgraph_node *node,
+ struct cgraph_node *inlined_to)
+{
+ struct cgraph_edge *e;
+ for (e = node->callees; e; e = e->next_callee)
+ {
+ if (e->callee->global.inlined_to)
+ {
+ e->callee->global.inlined_to = inlined_to;
+ update_inlined_to_pointers (e->callee, node);
+ }
+ }
+}
\f
/* For functions-as-trees languages, this performs all optimization and
if (!flag_unit_at_a_time)
{
struct cgraph_edge *e;
+ verify_cgraph ();
while (node->callees)
cgraph_remove_edge (node->callees);
node->callees = saved_node->callees;
for (e = node->callees; e; e = e->next_callee)
{
if (e->callee->global.inlined_to)
- e->callee->global.inlined_to = node;
+ {
+ e->callee->global.inlined_to = node;
+ update_inlined_to_pointers (e->callee, node);
+ }
e->caller = node;
}
cgraph_remove_node (saved_node);