This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Question on tree-walking and mutually-recursive types
- From: Richard Henderson <rth at redhat dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 29 Jun 2004 11:30:28 -0700
- Subject: Re: Question on tree-walking and mutually-recursive types
- References: <10406290304.AA05106@vlsi1.ultra.nyu.edu>
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~