From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12429 invoked by alias); 8 Apr 2011 14:42:31 -0000 Received: (qmail 12411 invoked by uid 22791); 8 Apr 2011 14:42:30 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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, 08 Apr 2011 14:42:24 +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 p38EgO6B016210 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 8 Apr 2011 10:42:24 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p38EgNNR018138; Fri, 8 Apr 2011 10:42:24 -0400 Received: from [10.3.113.84] (ovpn-113-84.phx2.redhat.com [10.3.113.84]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p38EgMiC027374; Fri, 8 Apr 2011 10:42:22 -0400 Message-ID: <4D9F1ECE.60509@redhat.com> Date: Fri, 08 Apr 2011 14:42:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Lightning/1.0b3pre Thunderbird/3.1.9 MIME-Version: 1.0 To: Richard Guenther CC: Laurynas Biveinis , Steven Bosscher , gcc-patches@gcc.gnu.org Subject: Re: [gc-improv] Permanent vs function RTL obstack fix References: <4D9D56F4.3050203@gmail.com> <4D9F1D63.9010509@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-04/txt/msg00637.txt.bz2 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 04/08/11 08:39, Richard Guenther wrote: > On Fri, Apr 8, 2011 at 4:36 PM, Jeff Law wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> On 04/08/11 07:21, Laurynas Biveinis wrote: >>> 2011/4/8 Steven Bosscher : >>>>> * stmt.c (label_rtx): Allocate RTX in permanent RTL memory. >>>> >>>> That looks strange, labels should be function specific, except >>>> non-local labels. Maybe you can get away with allocating DECL_NONLOCAL >>>> labels on the permanent rtl obstack? >>> >>> That's a good idea, I will try it once things are stable on the branch. >>> >>>> Perhaps a third, per-translation-unit obstack is necessary? >>> >>> Perhaps. After I finish with permanent rtl obstack, I will measure how >>> large it gets and if it's worthwhile to split out >>> per-translation-obstack out of it. >> And then you'll want a per-statement obstack, then per-expression >> obstack, and before you know it, GCC looks much like it did 20 years ago. >> >> Sigh. > > I remember it was fast at that time though ;) Yea, fast to segfault dereferencing a dangling pointer due to placing an object on the wrong obstack. And fast because we didn't have a good way to keep most expressions beyond the lifetime of a single statement thus preventing any kind of higher level analysis and optimization. Jeff -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJNnx7OAAoJEBRtltQi2kC7cLQH/RDU86grC6BTnVc9iG5KE4zu B+YP0+42dJfrinjL0cqkPeEprTr5j144XJYujsxT49f7G+qu1qX+gzyfowgTdOwb dIfhnWXoC9d09E0nXD+mLVwHwNwsrkv1loN501wryPksSOsgjxjhwc7TCW8WnW93 2sjrpKLg0qvy+/8KH0RTA80q9xehGkfqux3y4ZbNLsPBreYp+jhTzsVqjxk+T0F7 Ges5PFLjXwQdbx+iFBStQhlZHf8A/3TRXnrfllPRRl37bzR56Jnza2ag8EkVHwXi 5bNQ+YWqJXHiKG2nInARTNGnJXQU8XMGYYaZTx1Myl0c8osAlfu0QwLHrJn+Few= =4X+7 -----END PGP SIGNATURE-----