p = &pass_loop.sub;
NEXT_PASS (pass_loop_init);
NEXT_PASS (pass_lim);
+ NEXT_PASS (pass_unswitch);
NEXT_PASS (pass_iv_canon);
+ NEXT_PASS (pass_record_bounds);
NEXT_PASS (pass_if_conversion);
NEXT_PASS (pass_vectorize);
NEXT_PASS (pass_linear_transform);
}
while (pass);
}
+\f
+
+/* Update recursively 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, inlined_to);
+ }
+ }
+}
\f
/* For functions-as-trees languages, this performs all optimization and
compilation for FNDECL. */
void
-tree_rest_of_compilation (tree fndecl, bool nested_p)
+tree_rest_of_compilation (tree fndecl)
{
location_t saved_loc;
struct cgraph_node *saved_node = NULL, *node;
if (!vars_to_rename)
vars_to_rename = BITMAP_XMALLOC ();
- /* If this is a nested function, protect the local variables in the stack
- above us from being collected while we're compiling this function. */
- if (nested_p)
- ggc_push_context ();
-
/* Perform all tree transforms and optimizations. */
execute_pass_list (all_passes);
if (!flag_unit_at_a_time)
{
struct cgraph_edge *e;
+
while (node->callees)
cgraph_remove_edge (node->callees);
node->callees = saved_node->callees;
saved_node->callees = NULL;
+ update_inlined_to_pointers (node, node);
for (e = node->callees; e; e = e->next_callee)
- {
- if (e->callee->global.inlined_to)
- e->callee->global.inlined_to = node;
- e->caller = node;
- }
+ e->caller = node;
cgraph_remove_node (saved_node);
}
}
}
}
- if (!nested_p && !flag_inline_trees)
+ if (!flag_inline_trees)
{
DECL_SAVED_TREE (fndecl) = NULL;
if (DECL_STRUCT_FUNCTION (fndecl) == 0
input_location = saved_loc;
ggc_collect ();
-
- /* Undo the GC context switch. */
- if (nested_p)
- ggc_pop_context ();
timevar_pop (TV_EXPAND);
}