From patchwork Fri Feb 22 10:03:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 222497 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 A3DAE2C02A2 for ; Fri, 22 Feb 2013 21:03:37 +1100 (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=1362132217; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Date:From:To:Cc:Subject:Message-ID:Reply-To: References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To:User-Agent:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=OsgjGYg+HiCE7nMlXtfgWpCfCJ8=; b=nwNdoLy9+lzvQGC dtgh8yMra/hL5ohpC2tDAu3WxlENoCwqjvKC7vTQldhNN8tey/HPYjgd+B/kpvYA F6vwBLARgNFxk0yF3aQ4JyEux37fI/XYB9D0fSN2TW/RBU7UoI4a1Sk5Bf/SSOLA vkVTH3HUiv8mXyjeTtx99Q/eNiUA= 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:Received:Date:From:To:Cc:Subject:Message-ID:Reply-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=csCT5GcUeL3oZYlwEKOd/EcOlDmw1RcT9gWHdYNuyElqu3JVpLg7z7KSKV4b4q W86IDZIlrBppFcgbJ3fUi5HJ3/5hZ4wAV58R6UhL88y3ImE6dMCSsA0GHmBmljuL /pMT/Zli9Dm1wmjd04otCD8QNb4Nd4SpTHVmMNYzFLbqU=; Received: (qmail 19008 invoked by alias); 22 Feb 2013 10:03:27 -0000 Received: (qmail 18998 invoked by uid 22791); 22 Feb 2013 10:03:25 -0000 X-SWARE-Spam-Status: No, hits=-6.6 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_SPAMHAUS_DROP, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, RP_MATCHES_RCVD, SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 22 Feb 2013 10:03:16 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r1MA3FQN031929 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 22 Feb 2013 05:03:16 -0500 Received: from zalov.redhat.com (vpn1-4-48.ams2.redhat.com [10.36.4.48]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r1MA3Euo029441 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 22 Feb 2013 05:03:15 -0500 Received: from zalov.cz (localhost [127.0.0.1]) by zalov.redhat.com (8.14.5/8.14.5) with ESMTP id r1MA3D8O013612; Fri, 22 Feb 2013 11:03:13 +0100 Received: (from jakub@localhost) by zalov.cz (8.14.5/8.14.5/Submit) id r1MA3CYi013611; Fri, 22 Feb 2013 11:03:12 +0100 Date: Fri, 22 Feb 2013 11:03:12 +0100 From: Jakub Jelinek To: Steve Ellcey , Aldy Hernandez Cc: gcc-patches , "rdsandiford@googlemail.com" Subject: Re: PR target/52555: attribute optimize is overriding command line options Message-ID: <20130222100311.GJ1215@tucnak.zalov.cz> Reply-To: Jakub Jelinek References: <20130218230522.GB1215@tucnak.zalov.cz> <1C0E790D7E4C75418622FD04CC2A1172015D5C06@bamail02.ba.imgtec.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1C0E790D7E4C75418622FD04CC2A1172015D5C06@bamail02.ba.imgtec.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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 On Thu, Feb 21, 2013 at 11:02:56PM +0000, Steve Ellcey wrote: > Have you gotten any reports of problems with this patch? It seems to be sending cc1 into an infinite > loop during the GCC testsuite for me. I am testing the mips-mti-linux-gnu target and tests like > gcc.target/mips/call-saved-1.c are causing cc1 to suck up all my memory and swap space before the > test times out. > > I will keep digging and see if I can figure out what is going on but I wanted to see if anyone else has > reported this problem. I think this should fix this (but totally untested except for call-saved-1.c, and it doesn't make any sense to test on non-mips). The problem I believe is that Aldy has changed init_optabs and insn-opinit.c to use this_fn_optabs instead of this_target_optabs, but it is only set in invoke_set_current_function_hook. During save_target_globals we want to init this_target_optabs, so we need to temporarily switch this_fn_optabs to make that happen. 2013-02-22 Jakub Jelinek PR target/52555 * target-globals.c (save_target_globals): For init_reg_sets and target_reinit remporarily set this_fn_optabs to this_target_optabs. Jakub --- gcc/target-globals.c.jj 2013-02-19 07:40:03.000000000 +0100 +++ gcc/target-globals.c 2013-02-22 10:55:36.725435859 +0100 @@ -67,6 +67,7 @@ struct target_globals * save_target_globals (void) { struct target_globals *g; + struct target_optabs *saved_this_fn_optabs = this_fn_optabs; g = ggc_alloc_target_globals (); g->flag_state = XCNEW (struct target_flag_state); @@ -86,8 +87,10 @@ save_target_globals (void) g->bb_reorder = XCNEW (struct target_bb_reorder); g->lower_subreg = XCNEW (struct target_lower_subreg); restore_target_globals (g); + this_fn_optabs = this_target_optabs; init_reg_sets (); target_reinit (); + this_fn_optabs = saved_this_fn_optabs; return g; }