This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Why is the TREE_PURPOSE of a CONSTRUCTOR_ELT list for ARRAY_TYPENULL?


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. <http://gcc.gnu.org/ml/gcc-patches/2000-11/msg00253.html> 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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]