aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-inline.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r--gcc/ipa-inline.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index dd25ae3..14e8256 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -1223,7 +1223,7 @@ lookup_recursive_calls (struct cgraph_node *node, struct cgraph_node *where,
static bool
recursive_inlining (struct cgraph_edge *edge,
- VEC (cgraph_edge_p, heap) **new_edges)
+ vec<cgraph_edge_p> *new_edges)
{
int limit = PARAM_VALUE (PARAM_MAX_INLINE_INSNS_RECURSIVE_AUTO);
fibheap_t heap;
@@ -1313,7 +1313,8 @@ recursive_inlining (struct cgraph_edge *edge,
/* We need original clone to copy around. */
master_clone = cgraph_clone_node (node, node->symbol.decl,
node->count, CGRAPH_FREQ_BASE,
- false, NULL, true);
+ false, vec<cgraph_edge_p>(),
+ true);
for (e = master_clone->callees; e; e = e->next_callee)
if (!e->inline_failed)
clone_inlined_nodes (e, true, false, NULL);
@@ -1373,11 +1374,11 @@ compute_max_insns (int insns)
/* Compute badness of all edges in NEW_EDGES and add them to the HEAP. */
static void
-add_new_edges_to_heap (fibheap_t heap, VEC (cgraph_edge_p, heap) *new_edges)
+add_new_edges_to_heap (fibheap_t heap, vec<cgraph_edge_p> new_edges)
{
- while (VEC_length (cgraph_edge_p, new_edges) > 0)
+ while (new_edges.length () > 0)
{
- struct cgraph_edge *edge = VEC_pop (cgraph_edge_p, new_edges);
+ struct cgraph_edge *edge = new_edges.pop ();
gcc_assert (!edge->aux);
if (edge->inline_failed
@@ -1402,12 +1403,12 @@ inline_small_functions (void)
fibheap_t edge_heap = fibheap_new ();
bitmap updated_nodes = BITMAP_ALLOC (NULL);
int min_size, max_size;
- VEC (cgraph_edge_p, heap) *new_indirect_edges = NULL;
+ vec<cgraph_edge_p> new_indirect_edges = vec<cgraph_edge_p>();
int initial_size = 0;
struct cgraph_node **order = XCNEWVEC (struct cgraph_node *, cgraph_n_nodes);
if (flag_indirect_inlining)
- new_indirect_edges = VEC_alloc (cgraph_edge_p, heap, 8);
+ new_indirect_edges.create (8);
/* Compute overall unit size and other global parameters used by badness
metrics. */
@@ -1654,8 +1655,7 @@ inline_small_functions (void)
}
free_growth_caches ();
- if (new_indirect_edges)
- VEC_free (cgraph_edge_p, heap, new_indirect_edges);
+ new_indirect_edges.release ();
fibheap_delete (edge_heap);
if (dump_file)
fprintf (dump_file,
@@ -1994,7 +1994,7 @@ early_inliner (void)
it. This may confuse ourself when early inliner decide to inline call to
function clone, because function clones don't have parameter list in
ipa-prop matching their signature. */
- if (ipa_node_params_vector)
+ if (ipa_node_params_vector.exists ())
return 0;
#ifdef ENABLE_CHECKING