From patchwork Fri Apr 15 15:26:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Revital Eres X-Patchwork-Id: 1039 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:48:32 -0000 Delivered-To: patches@linaro.org Received: by 10.224.67.148 with SMTP id r20cs57935qai; Fri, 15 Apr 2011 08:26:09 -0700 (PDT) Received: by 10.52.69.205 with SMTP id g13mr3154757vdu.241.1302881168568; Fri, 15 Apr 2011 08:26:08 -0700 (PDT) Received: from mail-qy0-f178.google.com (mail-qy0-f178.google.com [209.85.216.178]) by mx.google.com with ESMTPS id jl5si1420658vdb.44.2011.04.15.08.26.08 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 15 Apr 2011 08:26:08 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.216.178 is neither permitted nor denied by best guess record for domain of revital.eres@linaro.org) client-ip=209.85.216.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.216.178 is neither permitted nor denied by best guess record for domain of revital.eres@linaro.org) smtp.mail=revital.eres@linaro.org Received: by qyk2 with SMTP id 2so2136914qyk.16 for ; Fri, 15 Apr 2011 08:26:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.202.132 with SMTP id fe4mr1602340qab.249.1302881167933; Fri, 15 Apr 2011 08:26:07 -0700 (PDT) Received: by 10.224.28.136 with HTTP; Fri, 15 Apr 2011 08:26:07 -0700 (PDT) Date: Fri, 15 Apr 2011 18:26:07 +0300 Message-ID: Subject: [PATCH, SMS] Avoid unfreed memory when SMS fails From: Revital Eres To: zaks@il.ibm.com Cc: Patch Tracking , gcc-patches@gcc.gnu.org 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. 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 {