This is the mail archive of the
mailing list for the GCC project.
Re: [tree-ssa] Re-use SSA_NAME expressions
- From: Richard Henderson <rth at redhat dot com>
- To: law at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 19 Nov 2003 14:55:06 -0800
- Subject: Re: [tree-ssa] Re-use SSA_NAME expressions
- References: <200311192007.hAJK7uLp011271@speedy.slc.redhat.com>
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 function
> + 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.
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.