Patchwork [SMS] Avoid unfreed memory when SMS fails

login
register
mail settings
Submitter Revital Eres
Date April 15, 2011, 3:26 p.m.
Message ID <BANLkTikLhwJTa9CftDkXEk+MGX5Ypv+wsA@mail.gmail.com>
Download mbox | patch
Permalink /patch/91391/
State New
Headers show

Comments

Revital Eres - April 15, 2011, 3:26 p.m.
Hello,

This patch fixes the scenario where SMS fails to
schedule a loop and continue to the next one without
freeing data structures allocated while scheduling
the first loop.

Bootstrap and regtested on ppc64-redhat-linux.

OK for mainline?

Thanks,
Revital

Changelog:

* modulo-sched.c (sms_schedule): Avoid unfreed memory when SMS fails.
Richard Guenther - April 15, 2011, 3:40 p.m.
On Fri, Apr 15, 2011 at 5:26 PM, Revital Eres <revital.eres@linaro.org> wrote:
> Hello,
>
> This patch fixes the scenario where SMS fails to
> schedule a loop and continue to the next one without
> freeing data structures allocated while scheduling
> the first loop.
>
> Bootstrap and regtested on ppc64-redhat-linux.
>
> OK for mainline?

Ok.

Thanks,
Richard.

> Thanks,
> Revital
>
> Changelog:
>
> * modulo-sched.c (sms_schedule): Avoid unfreed memory when SMS fails.
>
> Index: modulo-sched.c
> ===================================================================
> --- modulo-sched.c      (revision 170464)
> +++ modulo-sched.c      (working copy)
> @@ -1177,7 +1177,6 @@ sms_schedule (void)
>              fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC, trip_count);
>              fprintf (dump_file, ")\n");
>            }
> -         continue;
>        }
>       else
>        {
>

Patch

Index: modulo-sched.c
===================================================================
--- modulo-sched.c      (revision 170464)
+++ modulo-sched.c      (working copy)
@@ -1177,7 +1177,6 @@  sms_schedule (void)
              fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC, trip_count);
              fprintf (dump_file, ")\n");
            }
-         continue;
        }
       else
        {