cgraph_output_in_order (void)
{
int max;
- size_t size;
struct cgraph_order_sort *nodes;
int i;
struct cgraph_node *pf;
struct cgraph_asm_node *pa;
max = cgraph_order;
- size = max * sizeof (struct cgraph_order_sort);
- nodes = (struct cgraph_order_sort *) alloca (size);
- memset (nodes, 0, size);
+ nodes = XCNEWVEC (struct cgraph_order_sort, max);
varpool_analyze_pending_decls ();
}
cgraph_asm_nodes = NULL;
+ free (nodes);
}
/* Return true when function body of DECL still needs to be kept around
DECL_ARTIFICIAL (decl) = 1;
DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (decl) = 1;
DECL_SAVED_TREE (decl) = body;
- TREE_PUBLIC (decl) = ! targetm.have_ctors_dtors;
+ if (!targetm.have_ctors_dtors)
+ {
+ TREE_PUBLIC (decl) = 1;
+ DECL_PRESERVE_P (decl) = 1;
+ }
DECL_UNINLINABLE (decl) = 1;
DECL_INITIAL (decl) = make_node (BLOCK);
gsi = gsi_for_stmt (e->call_stmt);
gsi_replace (&gsi, new_stmt, true);
+ update_stmt (new_stmt);
/* Update EH information too, just in case. */
maybe_clean_or_replace_eh_stmt (e->call_stmt, new_stmt);
push_cfun (DECL_STRUCT_FUNCTION (node->decl));
for (e = node->callees; e; e = e->next_callee)
cgraph_redirect_edge_call_stmt_to_callee (e);
+ gcc_assert (!need_ssa_update_p (cfun));
pop_cfun ();
current_function_decl = NULL;
#ifdef ENABLE_CHECKING