static void cgraph_mark_functions_to_output (void);
static void cgraph_expand_function (struct cgraph_node *);
static tree record_reference (tree *, int *, void *);
+static void cgraph_output_pending_asms (void);
/* Records tree nodes seen in record_reference. Simply using
walk_tree_without_duplicates doesn't guarantee each node is visited
if (flag_unit_at_a_time)
return false;
+ cgraph_output_pending_asms ();
+
while (cgraph_nodes_queue)
{
struct cgraph_node *n = cgraph_nodes_queue;
/* Rebuild call edges from current function after a passes not aware
of cgraph updating. */
-static void
+static unsigned int
rebuild_cgraph_edges (void)
{
basic_block bb;
}
initialize_inline_failed (node);
gcc_assert (!node->global.inlined_to);
+ return 0;
}
struct tree_opt_pass pass_rebuild_cgraph_edges =
cgraph_expand_all_functions (void)
{
struct cgraph_node *node;
- struct cgraph_node **order =
- xcalloc (cgraph_n_nodes, sizeof (struct cgraph_node *));
+ struct cgraph_node **order = XCNEWVEC (struct cgraph_node *, cgraph_n_nodes);
int order_pos = 0, new_order_pos = 0;
int i;
nodes[i].kind = ORDER_ASM;
nodes[i].u.a = pa;
}
- cgraph_asm_nodes = NULL;
for (i = 0; i < max; ++i)
{
gcc_unreachable ();
}
}
+
+ cgraph_asm_nodes = NULL;
}
/* Mark visibility of all functions.
static struct cgraph_node *
cgraph_copy_node_for_versioning (struct cgraph_node *old_version,
- tree new_decl, varray_type redirect_callers)
+ tree new_decl,
+ VEC(cgraph_edge_p,heap) *redirect_callers)
{
struct cgraph_node *new_version;
struct cgraph_edge *e, *new_e;
if (!next_callee)
break;
}
- if (redirect_callers)
- for (i = 0; i < VARRAY_ACTIVE_SIZE (redirect_callers); i++)
- {
- e = VARRAY_GENERIC_PTR (redirect_callers, i);
- /* Redirect calls to the old version node
- to point to it's new version. */
- cgraph_redirect_edge_callee (e, new_version);
- }
+ for (i = 0; VEC_iterate (cgraph_edge_p, redirect_callers, i, e); i++)
+ {
+ /* Redirect calls to the old version node to point to its new
+ version. */
+ cgraph_redirect_edge_callee (e, new_version);
+ }
return new_version;
}
struct cgraph_node *
cgraph_function_versioning (struct cgraph_node *old_version_node,
- varray_type redirect_callers,
+ VEC(cgraph_edge_p,heap) *redirect_callers,
varray_type tree_map)
{
tree old_decl = old_version_node->decl;
cgraph_lower_function (node);
/* In non-unit-at-a-time we construct full fledged clone we never output to
- assembly file. This clone is pointed out by inline_decl of orginal function
+ assembly file. This clone is pointed out by inline_decl of original function
and inlining infrastructure knows how to deal with this. */
if (!flag_unit_at_a_time)
{