diff options
Diffstat (limited to 'gcc/tree-loop-linear.c')
-rw-r--r-- | gcc/tree-loop-linear.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/tree-loop-linear.c b/gcc/tree-loop-linear.c index f2bd75d..b7e57a6 100644 --- a/gcc/tree-loop-linear.c +++ b/gcc/tree-loop-linear.c @@ -243,6 +243,9 @@ void linear_transform_loops (struct loops *loops) { unsigned int i; + VEC(tree,gc) *oldivs = NULL; /* FIXME:These should really be on the + heap. (nathan 2005/04/15)*/ + VEC(tree,gc) *invariants = NULL; /* FIXME:Likewise. */ for (i = 1; i < loops->num; i++) { @@ -251,8 +254,6 @@ linear_transform_loops (struct loops *loops) varray_type dependence_relations; struct loop *loop_nest = loops->parray[i]; struct loop *temp; - VEC (tree) *oldivs = NULL; - VEC (tree) *invariants = NULL; lambda_loopnest before, after; lambda_trans_matrix trans; bool problem = false; @@ -273,6 +274,8 @@ linear_transform_loops (struct loops *loops) } */ if (!loop_nest || !loop_nest->inner) continue; + VEC_truncate (tree, oldivs, 0); + VEC_truncate (tree, invariants, 0); depth = 1; for (temp = loop_nest->inner; temp; temp = temp->inner) { @@ -365,11 +368,11 @@ linear_transform_loops (struct loops *loops) after, trans); if (dump_file) fprintf (dump_file, "Successfully transformed loop.\n"); - oldivs = NULL; - invariants = NULL; free_dependence_relations (dependence_relations); free_data_refs (datarefs); } + VEC_free (tree, gc, oldivs); + VEC_free (tree, gc, invariants); scev_reset (); update_ssa (TODO_update_ssa); rewrite_into_loop_closed_ssa (NULL); |