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  <ja...@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 <rguent...@suse.de>
SUSE / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746
GF: Jeff Hawn, Jennifer Guild, Felix Imend

Reply via email to