This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Target macros vs. target hooks - policy/goal is hooks, isn't it?
- From: Ira Rosen <IRAR at il dot ibm dot com>
- To: Steven Bosscher <stevenb dot gcc at gmail dot com>
- Cc: Dorit Nuzman <DORIT at il dot ibm dot com>, GCC Mailing List <gcc at gcc dot gnu dot org>, Mark Mitchell <mark at codesourcery dot com>
- Date: Thu, 3 Jun 2010 10:01:27 +0300
- Subject: Re: Target macros vs. target hooks - policy/goal is hooks, isn't it?
- References: <201005261703.o4QH36S7012785@d12av02.megacenter.de.ibm.com> <4BFD5766.3050709@codesourcery.com> <AANLkTikvCOMABhb0xNQHGBv5PzOIaYpfRQZfHCkSyb9l@mail.gmail.com>
Steven Bosscher <stevenb.gcc@gmail.com> wrote on 02/06/2010 06:13:36 PM:
>
> On Wed, May 26, 2010 at 7:16 PM, Mark Mitchell <mark@codesourcery.com>
wrote:
> > Ulrich Weigand wrote:
> >
> >>> So the question is: The goal is to have hooks, not macros, right? If
> >>> so, can reviewers please take care to reject patches that introduce
> >>> new macros?
> >>
> >> I don't know to which extent this is a formal goal these days, but I
> >> personally agree that it would be nice to eliminate macros.
> >
> > Yes, the (informally agreed) policy is to have hooks, not macros.
There
> > may be situations where that is technically impossible, but I'd expect
> > those to be very rare.
>
> Another batch of recently introduced target macros instead of target
hooks:
Not so recently - three years ago.
>
> tree-vectorizer.h:#ifndef TARG_COND_TAKEN_BRANCH_COST
> tree-vectorizer.h:#ifndef TARG_COND_NOT_TAKEN_BRANCH_COST
> tree-vectorizer.h:#ifndef TARG_SCALAR_STMT_COST
> tree-vectorizer.h:#ifndef TARG_SCALAR_LOAD_COST
> tree-vectorizer.h:#ifndef TARG_SCALAR_STORE_COST
> tree-vectorizer.h:#ifndef TARG_VEC_STMT_COST
> tree-vectorizer.h:#ifndef TARG_VEC_TO_SCALAR_COST
> tree-vectorizer.h:#ifndef TARG_SCALAR_TO_VEC_COST
> tree-vectorizer.h:#ifndef TARG_VEC_LOAD_COST
> tree-vectorizer.h:#ifndef TARG_VEC_UNALIGNED_LOAD_COST
> tree-vectorizer.h:#ifndef TARG_VEC_STORE_COST
> tree-vectorizer.h:#ifndef TARG_VEC_PERMUTE_COST
>
> Could the vectorizer folks please turn these into target hooks?
OK, I'll do that.
Ira
>
> Ciao!
> Steven