This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix memory leaks in ldist_gen (PR middle-end/56461)
- From: Richard Biener <rguenther at suse dot de>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 4 Mar 2013 10:59:49 +0100 (CET)
- Subject: Re: [PATCH] Fix memory leaks in ldist_gen (PR middle-end/56461)
- References: <20130301200757.GE12913@tucnak.redhat.com>
On Fri, 1 Mar 2013, Jakub Jelinek wrote:
> Hi!
>
> When merging partitions together, we remove them from partitions vector,
> thus don't free them at all. Fixed thusly, bootstrapped/regtested on
> x86_64-linux and i686-linux, ok for trunk?
Ok.
Thanks,
Richard.
> 2013-03-01 Jakub Jelinek <jakub@redhat.com>
>
> PR middle-end/56461
> * tree-loop-distribution.c (ldist_gen): Call partition_free after each
> partitions.ordered_remove.
>
> --- gcc/tree-loop-distribution.c.jj 2013-01-28 17:06:51.000000000 +0100
> +++ gcc/tree-loop-distribution.c 2013-03-01 13:17:11.851331653 +0100
> @@ -1306,6 +1306,7 @@ ldist_gen (struct loop *loop, struct gra
> 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 gra
> 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 gra
> bitmap_ior_into (into->stmts, what->stmts);
> into->kind = PKIND_REDUCTION;
> partitions.ordered_remove (i);
> + partition_free (what);
> }
> }
> }
>
> Jakub
>
>
--
Richard Biener <rguenther@suse.de>
SUSE / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746
GF: Jeff Hawn, Jennifer Guild, Felix Imend