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: Clear some of pointers in SSA_NAME


On Mon, 2004-09-20 at 12:37, Jan Hubicka wrote:
> > I'd be very curious to know which of those pointers is keeping data
> > live -- mostly because it may point to a pass that is not cleaning
> > up things as well as it should.
> 
> It was the SSA_NAME_DEF_STMT that is AFAIK never cleared out even tought
> tree-ssa-dce cares to get rid of the dead SSA_NAMES via this recycling
> machinery.
I can't see how that would be the culprit since SSA_NAME_DEF_STMT is 
cleared in names are recycled (SSA_NAME_DEF_STMT uses the same field
as TREE_CHAIN, which is used to chain together free ssanames).

It must be one of the other fields that is causing the memory leak.
Again, I'd really like to know which one since it may indicate a deeper
problem than we're attacking with this change.

> > 
> > On a style note, I'd probably suggest using memset to wipe the
> > entire node, then put back the 2-3 fields we actually need, ie
> > the tree code, the ssa version # associated with the node and
> > (for a little while longer) the SSA_NAME_VAR associated with
> > the node.
> > 
> > [ Also note that once you wipe the node en-masse in release_ssa_name,
> >   you no longer have to do so in the code which recycles them. ]
> 
> OK, I can update the patch this way if it seems to be acceptable.
Well, I went ahead and did the change to zero the whole node and put
back the fields we actually care about.  So no need to update the 
patch.

jeff



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