This is the mail archive of the 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

In message <>, Richard Henderson writes:
 >On Wed, Nov 19, 2003 at 01:07:56PM -0700, 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 :-)


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