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: 91391 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id D4F05B6EF7 for ; Sat, 16 Apr 2011 01:26:16 +1000 (EST) Received: (qmail 31705 invoked by alias); 15 Apr 2011 15:26:15 -0000 Received: (qmail 31697 invoked by uid 22791); 15 Apr 2011 15:26:14 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-qy0-f175.google.com (HELO mail-qy0-f175.google.com) (209.85.216.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 15 Apr 2011 15:26:08 +0000 Received: by qyk35 with SMTP id 35so4433993qyk.20 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 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list 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 {