This is the mail archive of the gcc-patches@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: Fix PR 33870


On Wed, Nov 07, 2007 at 07:24:32PM -0500, Diego Novillo wrote:
> --- tree.h	(revision 129956)
> +++ tree.h	(working copy)
> @@ -2573,15 +2573,21 @@ struct tree_struct_field_tag GTY(())
>    /* Size of the field.  */
>    unsigned HOST_WIDE_INT size;
>  
> +  /* True if this SFT is for a field in a nested structure.  */
> +  unsigned int in_nested_struct : 1;
> +
>    /* Alias set for a DECL_NONADDRESSABLE_P field.  Otherwise -1.  */
>    alias_set_type alias_set;
>  };

Doesn't this grow struct tree_struct_field_tag by in most cases 8 bytes?
Aren't there enough bitfields that could be used for this bit instead?

struct tree_memory_tag GTY(())
{
  struct tree_decl_minimal common;

  bitmap GTY ((skip)) aliases;

  unsigned int is_global:1;
};

31 or even 63 bits in tree_memory_tag (and then tree_base has a whole
bunch of spare bits, so perhaps if is_global moved to one of those too
(of course guarded with TREE_MEMORY_TAG_CHECK resp.
STRUCT_FIELD_TAG_CHECK), we would save even 8 more bytes here.
I know [tuples] does far more here, but even 4.3 will be used in the wild
and every byte in often used structs counts.

	Jakub


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