This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa, RFC] SSA_NAMES and overload of chain field
>
>
> On Fri, 28 Nov 2003, Jan Hubicka wrote:
>
> > Hi,
> > the chain filed is special because GGC is aware of fact that the chain
> > is used as linked list:
> > union lang_tree_node
> > GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"),
> > chain_next ("TREE_CODE (&%h.generic) == INTEGER_TYPE ? (union lang_tree_node *)TYPE_NEXT_VARIANT (&%h.generic) : (union lang_tree_node *)TREE_CHAIN (&%h.generic)")))
> >
> > The use of the field in SSA_NAME_DEF_STMT breaks this expectation and
> > confuses GGC when multiple SSA_NAMES point to same DEF_STMT.
> >
> > The attached patch fixes it by avoiding the overload of chain and ading
> > separate field for this, but I am open for further suggestions.
> >
> > Bootstrapped/regtested i686-pc-gnu-linux in isolation
> > and additionally x86_64-linux in combination with two patches sent
> > earlier.
> > Honza
>
> Just to make sure nothing bad happens, have you tried all these patches
> together with GCAC checking on?
Yes. Together with patch that calls ggc_collect in between each of
tree-ssa passes.
Concerning this particular patch, while looking into the code I am
getting to believe that I've just worked around bug I fixed later. Once
I am done with the other patches, I will give ggc_collect a try and
return to it if still fails.
For double linked lists the situation is somewhat different...
Honza