* [PATCH] Fix memory leaks in ldist_gen (PR middle-end/56461)
@ 2013-03-01 20:08 Jakub Jelinek
2013-03-04 10:00 ` Richard Biener
0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2013-03-01 20:08 UTC (permalink / raw)
To: Richard Biener; +Cc: gcc-patches
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?
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix memory leaks in ldist_gen (PR middle-end/56461)
2013-03-01 20:08 [PATCH] Fix memory leaks in ldist_gen (PR middle-end/56461) Jakub Jelinek
@ 2013-03-04 10:00 ` Richard Biener
0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2013-03-04 10:00 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: gcc-patches
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-04 10:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-01 20:08 [PATCH] Fix memory leaks in ldist_gen (PR middle-end/56461) Jakub Jelinek
2013-03-04 10:00 ` Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).