RFC: target macro->hook migration idea

DJ Delorie dj@redhat.com
Tue Jul 22 19:06:00 GMT 2003

> Something I've wondered is whether adding all of this indirections for
> the various hooks ends up contributing to the general slowdown of GCC.

It depends on the target.  The targets I create use functions for most
of the macros anyway, so there would be no change.  Plus, for macros
that are used multiple times (go_if_legit, etc) outlining them might
improve locality.  I suspect the big hits will come from macros that
are normally just constants (or used for #ifdefs), which become
functions.  Unfortunately, one of the ones I need to change is one of
those types anyway (the STRUCT_RETURN family needs to be

But there's certainly plenty of opportunity to benchmark the effects
of this.  We should benchmark build times too, although I can't see
how we can capture the time saved by not having to change tm.h as

More information about the Gcc mailing list