This is the mail archive of the gcc@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: Question on tree-walking and mutually-recursive types


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~


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