needless deep recursion in gt-c-decl.h
Per Bothner
per@bothner.com
Wed Jul 24 07:52:00 GMT 2002
Geoff Keating wrote:
> It means you need a more complicated design than the one you
> presented, because in
>
> while (! x is marked)
> {
> mark x;
> recursively mark objects pointed to by x, but don't look at TREE_CHAIN(x);
> x = TREE_CHAIN (x);
> }
>
> the loop rarely iterates more than once, since very often TREE_CHAIN(x)
> will be marked indirectly in the body of the loop. You need something
> like [two loops]
Are you saying that the single loop is incorrect, or that it is
inefficient? I don't understand why either would be the case.
--
--Per Bothner
per@bothner.com http://www.bothner.com/per/
More information about the Gcc
mailing list