From patchwork Tue Sep 4 19:03:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 181655 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 CEA2A2C00A0 for ; Wed, 5 Sep 2012 05:06:17 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1347390378; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:From:To:Subject:Date:User-Agent:MIME-Version: Content-Type:Message-Id:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=8/WWWT00fC7wD2K1OjYYDTd6dcE=; b=Berhmxu22Tg2QIp JTuRiacHhfL3kfwLGiT3oOZhnUD/vFA2gTvymURDiDhuGYqXzyyks6un84GINa3g AG+JVdPZaFauU9hvp1Dp/Uwy9yxf8r5ZUHRiudVw04tahsaQkAkQSB9Jt8mNiLf0 1E4V2ZDXJfh44d35BYUPQ7gfQySA= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:From:To:Subject:Date:User-Agent:MIME-Version:Content-Type:Message-Id:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=BTgdWqlcnxRyQTxUulgrn1tVio0DivX/eD4IIr7IRM3Va5NjTjmmgAQZAl3j2x rgLcNEBJpkbLjneqaeaiHmp/lU/Sgn+7J+rdYeHG5FZdKXvpmq0ST7O7dVURokKh wWuqqjsV11hEmN5ZOgXpbHiRCF9eL/y6NAL+g4NXQinyw=; Received: (qmail 5423 invoked by alias); 4 Sep 2012 19:06:13 -0000 Received: (qmail 5398 invoked by uid 22791); 4 Sep 2012 19:06:12 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,TW_DB X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 04 Sep 2012 19:05:58 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 364172900BA for ; Tue, 4 Sep 2012 21:06:06 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9FvXOwwjOBIW for ; Tue, 4 Sep 2012 21:06:06 +0200 (CEST) Received: from hermes.site (ADijon-552-1-96-50.w92-148.abo.wanadoo.fr [92.148.143.50]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 1041E2900B6 for ; Tue, 4 Sep 2012 21:06:06 +0200 (CEST) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: Fix PR rtl-optimization/54456 Date: Tue, 4 Sep 2012 21:03:27 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.34.10-0.6-desktop; KDE/4.4.4; x86_64; ; ) MIME-Version: 1.0 Message-Id: <201209042103.27190.ebotcazou@adacore.com> 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 This patch "fixes" PR rtl-optimization/54456 by running the first scheduling pass only when optimizing, as is already done for the second scheduling pass. Tested on x86_64-suse-linux, applied on the mainline. 2012-09-04 Eric Botcazou PR rtl-optimization/54456 * sched-rgn.c (gate_handle_sched): Return 1 only if optimize > 0. Index: sched-rgn.c =================================================================== --- sched-rgn.c (revision 190863) +++ sched-rgn.c (working copy) @@ -3473,7 +3473,7 @@ static bool gate_handle_sched (void) { #ifdef INSN_SCHEDULING - return flag_schedule_insns && dbg_cnt (sched_func); + return optimize > 0 && flag_schedule_insns && dbg_cnt (sched_func); #else return 0; #endif