This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch to convert ASM_GLOBALIZE_LABEL to a target hook


On Tue, Aug 20, 2002 at 10:53:23AM -0700, Richard Henderson wrote:
> On Mon, Aug 19, 2002 at 09:57:36PM -0400, Kaveh R. Ghazi wrote:
> > I was wondering if someone could please list for me what are the
> > benefits given the amount of work involved?  I can think of only one,
> > namely that you have a well defined interface for parameters and the
> > return value so you get better type safety (as opposed to the macro
> > mechanism.)  This is admittedly very good, but is that it?
> 
> Most of the time there is one definition of the hook that
> is overwhelmingly predominate, and so we get to remove
> insane amounts of code duplication.

Also, since hook definitions have to appear in <target>.c instead of
tm.h files, it is much easier to figure out what definition is in use
for any given target triple, and the code duplication is unlikely ever
to come back.

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]