Question on tree-walking and mutually-recursive types
Richard Henderson
rth@redhat.com
Tue Jun 29 18:45:00 GMT 2004
On Mon, Jun 28, 2004 at 11:04:15PM -0400, Richard Kenner wrote:
> Any suggestions how to deal with this?
Ignoring the fun algorithms bits downthread, I believe you'll find
that most of the time we're interested in walking trees, we're *not*
interested in walking the types. I think you'll find that the
majority of the callbacks to walk_tree include
if (TYPE_P (*tp))
*walk_subtrees = 0;
I think that we should be able to characterize some major pieces of
the tree that we'd like to skip, and add that as a flags argument
to walk_tree. (Another likely cut is wanting to see expressions,
and therefore decls, but not wanting to walk into decls.)
Then we say that it's an error to call walk_tree with flags that
allow types but not including a hash table, and enforce that with
an abort.
r~
More information about the Gcc
mailing list