/* Collect all callers of cgraph_node and its aliases that are known to lead to
cgraph_node (i.e. are not overwritable). */
-vec<cgraph_edge *>
+auto_vec<cgraph_edge *>
cgraph_node::collect_callers (void)
{
- vec<cgraph_edge *> redirect_callers = vNULL;
+ auto_vec<cgraph_edge *> redirect_callers;
call_for_symbol_thunks_and_aliases (collect_callers_of_node_1,
&redirect_callers, false);
return redirect_callers;
/* Collect all callers of cgraph_node and its aliases that are known to lead
to NODE (i.e. are not overwritable) and that are not thunks. */
- vec<cgraph_edge *> collect_callers (void);
+ auto_vec<cgraph_edge *> collect_callers (void);
/* Remove all callers from the node. */
void remove_callers (void);
vec<tree> known_csts,
vec<ipa_polymorphic_call_context> known_contexts,
struct ipa_agg_replacement_value *aggvals,
- vec<cgraph_edge *> callers)
+ vec<cgraph_edge *> &callers)
{
ipa_node_params *new_info, *info = ipa_node_params_sum->get (node);
vec<ipa_replace_map *, va_gc> *replace_trees = NULL;
ipcp_discover_new_direct_edges (new_node, known_csts, known_contexts, aggvals);
- callers.release ();
return new_node;
}
offset, val->value));
val->spec_node = create_specialized_node (node, known_csts, known_contexts,
aggvals, callers);
+ callers.release ();
overall_size += val->local_size_cost;
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " overall size reached %li\n",
}
struct cgraph_node *clone;
- vec<cgraph_edge *> callers = node->collect_callers ();
+ auto_vec<cgraph_edge *> callers = node->collect_callers ();
for (int i = callers.length () - 1; i >= 0; i--)
{
/* If node is not called by anyone, or all its caller edges are
self-recursive, the node is not really in use, no need to do
cloning. */
- callers.release ();
info->do_clone_for_all_contexts = false;
return ret;
}
unsigned &suffix_counter = clone_num_suffixes->get_or_insert (
IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (
node->decl)));
- vec<cgraph_edge *> callers = node->collect_callers ();
+ auto_vec<cgraph_edge *> callers = node->collect_callers ();
cgraph_node *new_node
= node->create_virtual_clone (callers, NULL, new_adjustments, "isra",
suffix_counter);