diff options
author | Jakub Jelinek <jakub@redhat.com> | 2006-10-06 18:57:27 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2006-10-06 18:57:27 +0200 |
commit | 3ac571201309b925c13eebe0a140b20f93dbf4b1 (patch) | |
tree | ac2555c908e09e415f6469a5dbdd8f4a4c0500b8 /gcc/tree-loop-linear.c | |
parent | c66475078ce85978489b9da5a19ebf21697f2b0d (diff) | |
download | gcc-3ac571201309b925c13eebe0a140b20f93dbf4b1.zip gcc-3ac571201309b925c13eebe0a140b20f93dbf4b1.tar.gz gcc-3ac571201309b925c13eebe0a140b20f93dbf4b1.tar.bz2 |
re PR tree-optimization/29330 (-O -ftree-loop-linear --> virtual memory exhausted)
PR tree-optimization/29330
* tree-data-ref.c (free_data_ref): Use DR_FREE_ACCESS_FNS macro.
(initialize_data_dependence_relation): Clear DDR_LOOP_NEST pointer
on newly allocated ddrs.
(find_loop_nest_1, find_loop_nest): Change LOOP_NEST to a pointer
to VEC (loop_p, heap) pointer.
(compute_data_dependences_for_loop): Adjust caller.
(free_dependence_relations): Free DDR_LOOP_NEST.
* tree-loop-linear.c (linear_transform_loops): Don't forget to
free DEPENDENCE_RELATIONS and DATAREFS.
* gcc.dg/pr29330.c: New test.
From-SVN: r117509
Diffstat (limited to 'gcc/tree-loop-linear.c')
-rw-r--r-- | gcc/tree-loop-linear.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/tree-loop-linear.c b/gcc/tree-loop-linear.c index 2ef7eac..2840e9b 100644 --- a/gcc/tree-loop-linear.c +++ b/gcc/tree-loop-linear.c @@ -308,7 +308,7 @@ linear_transform_loops (struct loops *loops) { if (dump_file) fprintf (dump_file, "Won't transform loop. Optimal transform is the identity transform\n"); - continue; + goto free_and_continue; } /* Check whether the transformation is legal. */ @@ -316,15 +316,15 @@ linear_transform_loops (struct loops *loops) { if (dump_file) fprintf (dump_file, "Can't transform loop, transform is illegal:\n"); - continue; + goto free_and_continue; } before = gcc_loopnest_to_lambda_loopnest (loops, loop_nest, &oldivs, &invariants); if (!before) - continue; - + goto free_and_continue; + if (dump_file) { fprintf (dump_file, "Before:\n"); @@ -346,6 +346,7 @@ linear_transform_loops (struct loops *loops) if (dump_file) fprintf (dump_file, "Successfully transformed loop.\n"); + free_and_continue: free_dependence_relations (dependence_relations); free_data_refs (datarefs); } |