From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23480 invoked by alias); 8 Sep 2004 21:35:51 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 23465 invoked from network); 8 Sep 2004 21:35:51 -0000 Received: from unknown (HELO lon-mail-3.gradwell.net) (193.111.201.127) by sourceware.org with SMTP; 8 Sep 2004 21:35:51 -0000 Received: (qmail 2621 invoked from network); 8 Sep 2004 21:35:50 -0000 Received: from digraph.polyomino.org.uk (postmaster%pop3.polyomino.org.uk@81.187.227.50) by lon-mail-3.gradwell.net with SMTP; 8 Sep 2004 21:35:50 -0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.41) id 1C5A6Y-0002jM-3X; Wed, 08 Sep 2004 21:35:50 +0000 Date: Wed, 08 Sep 2004 21:35:00 -0000 From: "Joseph S. Myers" X-X-Sender: jsm28@digraph.polyomino.org.uk To: Mark Mitchell cc: Richard Henderson , Daniel Berlin , gcc@gcc.gnu.org Subject: Re: Why is the TREE_PURPOSE of a CONSTRUCTOR_ELT list for ARRAY_TYPE NULL? In-Reply-To: <413F7045.8030405@codesourcery.com> Message-ID: References: <1094500549.13790.4.camel@dberlin.org> <20040907200301.GA30635@redhat.com> <413F7045.8030405@codesourcery.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2004-09/txt/msg00397.txt.bz2 On Wed, 8 Sep 2004, Mark Mitchell wrote: > In fact, I've been thinking that we should design a new datastructure for > CONTRUCTORs like so: > > struct initializer_chunk { > tree base; > tree count; > struct initializer_chunk *next; > tree *elems[1]; > }; > > with the idea of making these initializers vastly more compact. > > Yes, this is only a constant-factor improvement, but on test cases with large > arrays (of which there are plenty) this could very well result in the > difference between fitting in RAM and not fitting in RAM. Perhaps we should also call them something other than CONSTRUCTOR, given the several different meanings that word has. I wonder if the common case is that large initializers are mostly compile-time constants so all you need store is an array of target bytes (at the expense of greater complexity when you then want to extract a particular constant element). Cf. and predecessors (some of them in the previous month). -- Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/ http://www.srcf.ucam.org/~jsm28/gcc/#c90status - status of C90 for GCC 3.5 jsm@polyomino.org.uk (personal mail) jsm28@gcc.gnu.org (Bugzilla assignments and CCs)