On Thu, 2006-12-21 at 12:21 -0500, Daniel Berlin wrote:
> On 12/21/06, Diego Novillo <[EMAIL PROTECTED]> wrote:
> > Robert Kennedy wrote on 12/21/06 11:37:
> >
> > > The situation is that some SSA_NAMEs are disused (removed from the
> > > code) without being released onto the free list by
> > > release_ssa_name().
> > >
> > Yes, it happens if a name is put into the set of names to be updated by
> > update_ssa.
> >
> > After update_ssa, it should be true that every SSA name with no
> > SSA_NAME_DEF_STMT is in the free list.
> 
> In this case this isn't true, because we have code that orphans ssa
> names without releasing them.
> I'm sure Robert will explain further details in a few moments :)
True.  But remember, the stated purpose of the SSA_NAME recycling
code was _not_ to track every SSA_NAME that went "dead" and recycle
it, but instead to get the majority of them (and to ultimately save
memory by recycling them).  Orphan SSA_NAME were always expected.

If we wanted to add a new policy that all dead SSA_NAMEs must be
released to the recycling code, then that's fine, I'm not going
to object.

Alternately we can revisit the entire recycling question as well --
things have changed significantly since that code was written and
I've speculated that the utility of the recycling code has
diminished, possibly to the point of being a useless waste of time
and code.

The last obvious alternative I see is to stop chaining free nodes using
the TREE_CHAIN field.  That at least avoids the sharing between
TREE_CHAIN and SSA_NAME_DEF_STMT which often causes problems.  The
downside is given an SSA_NAME it still won't be obvious if it is an
orphan or still in use.

Jef

Reply via email to