From 5eb010bcfc8ac4879990414f278baf2af385688c Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 4 Mar 2013 11:08:57 +0100 Subject: [PATCH] re PR middle-end/56461 (GCC is leaking lots of memory) PR middle-end/56461 * tree-loop-distribution.c (ldist_gen): Call partition_free after each partitions.ordered_remove. From-SVN: r196427 --- gcc/ChangeLog | 4 ++++ gcc/tree-loop-distribution.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 10ecd953cc3..206908daf22 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2013-03-04 Jakub Jelinek + PR middle-end/56461 + * tree-loop-distribution.c (ldist_gen): Call partition_free after each + partitions.ordered_remove. + PR middle-end/56461 * tree-vect-stmts.c (vectorizable_conversion): Don't call vec_oprnds0.create (1) for modifier == NONE. diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c index 12fd4c50173..70f71b37c83 100644 --- a/gcc/tree-loop-distribution.c +++ b/gcc/tree-loop-distribution.c @@ -1306,6 +1306,7 @@ ldist_gen (struct loop *loop, struct graph *rdg, if (partition->kind == PKIND_REDUCTION) into->kind = PKIND_REDUCTION; partitions.ordered_remove (i); + partition_free (partition); i--; } else @@ -1342,6 +1343,7 @@ ldist_gen (struct loop *loop, struct graph *rdg, if (partition->kind == PKIND_REDUCTION) into->kind = PKIND_REDUCTION; partitions.ordered_remove (j); + partition_free (partition); j--; } } @@ -1367,6 +1369,7 @@ ldist_gen (struct loop *loop, struct graph *rdg, bitmap_ior_into (into->stmts, what->stmts); into->kind = PKIND_REDUCTION; partitions.ordered_remove (i); + partition_free (what); } } }