diff options
Diffstat (limited to 'gcc/tree-loop-distribution.c')
-rw-r--r-- | gcc/tree-loop-distribution.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c index 353ce24..79884bf 100644 --- a/gcc/tree-loop-distribution.c +++ b/gcc/tree-loop-distribution.c @@ -436,17 +436,15 @@ static struct graph * build_rdg (vec<loop_p> loop_nest, control_dependences *cd) { struct graph *rdg; - vec<gimple> stmts; vec<data_reference_p> datarefs; /* Create the RDG vertices from the stmts of the loop nest. */ - stmts.create (10); + stack_vec<gimple, 10> stmts; stmts_from_loop (loop_nest[0], &stmts); rdg = new_graph (stmts.length ()); datarefs.create (10); if (!create_rdg_vertices (rdg, stmts, loop_nest[0], &datarefs)) { - stmts.release (); datarefs.release (); free_rdg (rdg); return NULL; @@ -951,11 +949,10 @@ static partition_t build_rdg_partition_for_vertex (struct graph *rdg, int v) { partition_t partition = partition_alloc (NULL, NULL); - vec<int> nodes; + stack_vec<int, 3> nodes; unsigned i; int x; - nodes.create (3); graphds_dfs (rdg, &v, 1, &nodes, false, NULL); FOR_EACH_VEC_ELT (nodes, i, x) @@ -965,7 +962,6 @@ build_rdg_partition_for_vertex (struct graph *rdg, int v) loop_containing_stmt (RDG_STMT (rdg, x))->num); } - nodes.release (); return partition; } @@ -1388,7 +1384,6 @@ distribute_loop (struct loop *loop, vec<gimple> stmts, control_dependences *cd, int *nb_calls) { struct graph *rdg; - vec<loop_p> loop_nest; vec<partition_t> partitions; partition_t partition; bool any_builtin; @@ -1397,12 +1392,9 @@ distribute_loop (struct loop *loop, vec<gimple> stmts, int num_sccs = 1; *nb_calls = 0; - loop_nest.create (3); + stack_vec<loop_p, 3> loop_nest; if (!find_loop_nest (loop, &loop_nest)) - { - loop_nest.release (); - return 0; - } + return 0; rdg = build_rdg (loop_nest, cd); if (!rdg) @@ -1412,7 +1404,6 @@ distribute_loop (struct loop *loop, vec<gimple> stmts, "Loop %d not distributed: failed to build the RDG.\n", loop->num); - loop_nest.release (); return 0; } @@ -1648,7 +1639,6 @@ distribute_loop (struct loop *loop, vec<gimple> stmts, partitions.release (); free_rdg (rdg); - loop_nest.release (); return nbp - *nb_calls; } |