diff options
Diffstat (limited to 'gcc/tree-loop-distribution.c')
-rw-r--r-- | gcc/tree-loop-distribution.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c index a9ee67ff9cd..d1a499b951c 100644 --- a/gcc/tree-loop-distribution.c +++ b/gcc/tree-loop-distribution.c @@ -653,6 +653,8 @@ rdg_flag_loop_exits (struct graph *rdg, bitmap loops, bitmap partition, BITMAP_FREE (new_loops); } + + VEC_free (gimple, heap, conds); } /* Returns a bitmap in which all the statements needed for computing @@ -693,6 +695,8 @@ free_rdg_components (VEC (rdgc, heap) *components) VEC_free (int, heap, x->vertices); free (x); } + + VEC_free (rdgc, heap, components); } /* Build the COMPONENTS vector with the strongly connected components @@ -1146,6 +1150,9 @@ distribute_loop (struct loop *loop, VEC (gimple, heap) *stmts) gimple s; unsigned i; VEC (int, heap) *vertices; + VEC (ddr_p, heap) *dependence_relations; + VEC (data_reference_p, heap) *datarefs; + VEC (loop_p, heap) *loop_nest; if (loop->num_nodes > 2) { @@ -1157,7 +1164,10 @@ distribute_loop (struct loop *loop, VEC (gimple, heap) *stmts) return res; } - rdg = build_rdg (loop); + datarefs = VEC_alloc (data_reference_p, heap, 10); + dependence_relations = VEC_alloc (ddr_p, heap, 100); + loop_nest = VEC_alloc (loop_p, heap, 3); + rdg = build_rdg (loop, &loop_nest, &dependence_relations, &datarefs); if (!rdg) { @@ -1166,6 +1176,9 @@ distribute_loop (struct loop *loop, VEC (gimple, heap) *stmts) "FIXME: Loop %d not distributed: failed to build the RDG.\n", loop->num); + free_dependence_relations (dependence_relations); + free_data_refs (datarefs); + VEC_free (loop_p, heap, loop_nest); return res; } @@ -1191,7 +1204,9 @@ distribute_loop (struct loop *loop, VEC (gimple, heap) *stmts) res = ldist_gen (loop, rdg, vertices); VEC_free (int, heap, vertices); free_rdg (rdg); - + free_dependence_relations (dependence_relations); + free_data_refs (datarefs); + VEC_free (loop_p, heap, loop_nest); return res; } |