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: [tree-ssa] Re-use SSA_NAME expressions


On Wed, Nov 19, 2003 at 01:07:56PM -0700, law@redhat.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.


r~


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