This is the mail archive of the
mailing list for the GCC project.
Re: RFC: target macro->hook migration idea
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
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
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.