[PATCH]: RTL iterators

Jan Hubicka jh@suse.cz
Sun Aug 12 13:20:00 GMT 2001


> 
> 
> On Fri, 10 Aug 2001, Mark Mitchell wrote:
> 
> >
> >
> > --On Thursday, August 09, 2001 10:06:30 PM -0400 Daniel Berlin
> > <dan@cgsoftware.com> wrote:
> >
> > > Richard Henderson <rth@redhat.com> writes:
> > >
> > >> On Thu, Aug 09, 2001 at 05:37:51PM -0400, Daniel Berlin wrote:
> > >> > Only supports RTL that is 20 levels deep, but i've never seen one more
> > >>> than 3 levels deep, so i don't think this is a problem.
> > >>
> > >> What's wrong with for_each_rtx?  No max nesting level
> > >> (you _do_ get more than 20 -- sometimes hundreds), and
> > >> doesn't expand to obnoxious amounts of inline code.
> >
> > I like for_each_rtx, but of course I wrote it. :-)
> >
> > If anyone is concerned about the performance, or the pain of the
> > callbacks, you could always make a macro-ized version where the code
> > to plug in where the function goes now was a macro argument.
> 
> I effectively did just this, in a slightly different way (changing it so
> you drove the iteration, rather than *it* driving the iteration, and
> requiring you to tell it when to stop, etc).
> I'm told it's not useful by Richard, which I find odd.
> But i'll just rewrite for_each_rtx as a macro, maybe *that* will be more
> useful somehow.
I've done it (partly for perofrmance reasons) some time ago and the patch
got rejected.

Honza
> 
> >
> > But, you could also just go program in Lisp for a while; when you
> > come back you'll be all happy about little tiny functions. :-)
> >
> > --
> > Mark Mitchell                mark@codesourcery.com
> > CodeSourcery, LLC            http://www.codesourcery.com
> >



More information about the Gcc-patches mailing list