This is the mail archive of the
mailing list for the GCC project.
Re: [tree-ssa] Re-use SSA_NAME expressions
- From: law at redhat dot com
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 19 Nov 2003 16:09:07 -0700
- Subject: Re: [tree-ssa] Re-use SSA_NAME expressions
- Reply-to: law at redhat dot com
In message <20031119225506.GB1138@redhat.com>, Richard Henderson writes:
>On Wed, Nov 19, 2003 at 01:07:56PM -0700, email@example.com wrote:
>> + /* Free list of SSA_NAMEs. This list is wiped at the end of each functio
>> + after we leave SSA form. */
>> + static varray_type free_ssanames = NULL;
>A varray is truely wasteful here. I suggest instead:
> static GTY ((deletable (""))) tree free_ssanames;
>and chain the nodes via TREE_CHAIN.
Good point, I hadn't thought of using TREE_CHAIN to link the nodes.
I'll do that after the pending dom changes to reduce the number of
silly MODIFY_EXPR, EQ_EXPR and NE_EXPR nodes we create.
>The deletable tag means that we'll zap the list if we GC in the middle
>of optimization some day. Ordinarily you wouldn't want one of these
>cached free nodes preventing a page from being freed, but that would
>also prevent you from re-using SSA numbers that were freed so it might
>not be best here.
re-using the SSA numbers was a nice side effect, but it's not that
critical, if we lose that capability, then, well, so be it.
If we really wanted to get serious about compact SSA numbers, we'd
actually re-number them after dce or something like that. It'd be
hell on debugging dumps though :-)