public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* the size of tree_decl
@ 2003-02-10 22:18 Dan Nicolaescu
  2003-02-12  6:41 ` law
  0 siblings, 1 reply; 11+ messages in thread
From: Dan Nicolaescu @ 2003-02-10 22:18 UTC (permalink / raw)
  To: gcc


tree_decl is a big structure (108 bytes on x86), a lot of tree_decls are
created during a compilation and a lot more are created on the
tree-ssa branch. 

It seems that there are some things in a tree_decl that could be
placed somewhere else, and save some space that way. 


  tree vindex;  -- seems to be only used in C++ and java
Can it be moved to the language specific part of the decl?


  /* In a FUNCTION_DECL, this is DECL_SAVED_TREE.  */
  tree saved_tree;
  /* In a FUNCTION_DECL, these are function data which is to be kept
     as long as FUNCTION_DECL is kept.  */
  tree inlined_fns;

These seem to be only used for FUNCTION_DECLs. Can they be added as
an attribute to FUNCTION_DECLs instead of taking up space for all the
decl types? 

Also not all decl types use these:

  tree assembler_name;
  tree section_name;
  rtx rtl;	/* RTL representation for object.  */

None of these fields are accessed very often, so it shouldn't be a
big problem that they are stored somewhere else. 

Comments? 

[unfortunately I won't have time to work on this for about a month, so
if somebody wants to implement this in the meanwhile, please do so]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2003-02-15 20:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-10 22:18 the size of tree_decl Dan Nicolaescu
2003-02-12  6:41 ` law
2003-02-12 20:57   ` Dan Nicolaescu
2003-02-12 22:53     ` Neil Booth
2003-02-12 23:03       ` Gabriel Dos Reis
2003-02-12 23:04       ` law
2003-02-15 20:58       ` Per Bothner
2003-02-14 20:23     ` law
2003-02-14 21:09       ` Pop Sébastian
2003-02-14 23:41         ` law
2003-02-14 22:20       ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).