This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: Get rid of tree annotation
Hi,
On Mon, 23 Nov 2009, Richard Guenther wrote:
> +#define DECL_VAR_ANN_PTR(NODE) \
> + (TREE_CODE (NODE) == VAR_DECL ? &(NODE)->var_decl.ann \
> + : TREE_CODE (NODE) == PARM_DECL ? &(NODE)->parm_decl.ann \
> + : TREE_CODE (NODE) == RESULT_DECL ? &(NODE)->result_decl.ann \
> + : NULL)
>
> if you'd have put the ann field into tree_decl_with_rtl you could
> have avoided the above. I doubt it would have made a big
> difference - in fact only LABEL_DECLs and CONST_DECLs
> would have an unused field that way.
And tree_decl_with_vis, hence tree_decl_non_common, hence FUNCTION_DECL,
TYPE_DECL (!), and template and namespaces.
> So, any special reason you didn't go that way?
I wanted to go all the way in saving memory, not doing something fragile
again where it's not clear if this flag is used in some context or isn't.
Ciao,
Michael.