This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to convert ASM_GLOBALIZE_LABEL to a target hook
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Richard Henderson <rth at redhat dot com>,"Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 20 Aug 2002 11:13:28 -0700
- Subject: Re: Patch to convert ASM_GLOBALIZE_LABEL to a target hook
- References: <200208200157.VAA04409@caip.rutgers.edu> <20020820175323.GG23237@redhat.com>
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