RFC: target macro->hook migration idea
Neil Booth
neil@daikokuya.co.uk
Tue Jul 22 19:18:00 GMT 2003
Kaveh R. Ghazi wrote:-
> Something I've wondered is whether adding all of this indirections for
> the various hooks ends up contributing to the general slowdown of GCC.
>
> We're essentually "outlining" a whole lot of code and adding function
> pointer call overhead (which is worse than regular function calls
> because of the lookup.)
>
> Since we're going to convert a whole bunch at once, can we measure
> before and after the conversion to see what happens WRT compiler
> speed?
It's not all negative, however. For example, with the degug hooks,
it was found that hookizing things tended to encourage clarity
in the underlying code where there was previously obfuscation,
and as a result a whole bunch of redundancy was removed from varasm.c
for example.
Long-term I think having a proper non-macro interface to things
will help to remove stuff from GCC rather than add it, simply
by making things more transparent. It should also be possible
to reduce the number of hooks, I suspect we have too many and
that some are artificial.
Neil.
More information about the Gcc
mailing list