This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Add attribute((target("..."))) and pragma target to PowerPC
- From: Michael Meissner <meissner at linux dot vnet dot ibm dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Michael Meissner <meissner at linux dot vnet dot ibm dot com>, gcc-patches at gcc dot gnu dot org, dje dot gcc at gmail dot com
- Date: Mon, 1 Nov 2010 12:20:42 -0400
- Subject: Re: [PATCH] Add attribute((target("..."))) and pragma target to PowerPC
- References: <20101031182504.GA14215@hungry-tiger.westford.ibm.com> <AANLkTinG7YkZy-42m69NB6KRmRc1rAucg4V0qUt=9Sd4@mail.gmail.com>
On Sun, Oct 31, 2010 at 11:31:51AM -0700, H.J. Lu wrote:
> On Sun, Oct 31, 2010 at 11:25 AM, Michael Meissner
> <meissner@linux.vnet.ibm.com> wrote:
> > This patch extends my previous patch here:
> > http://gcc.gnu.org/ml/gcc-patches/2010-10/msg01952.html
> >
> > to include the initial PowerPC support for __attribute__((__target__("...")))
> > and for #pragma GCC target "...".
> >
> > The machine independent portion of the patch is mostly the same as I previously
> > submitted, except I reworked the awk scripts as suggested by Ralf Wildenhues to
> > not do a-z or A-Z inside of regexps, instead using the letters spelled out.
> >
> > The PowerPC support includes the initial support for the target attribute and
> > pragma, mostly cloning it from the work I did in GCC 4.3 to add the support to
> > the i386/x86_64 ports. ?The one thing that is not currently done is I didn't
> > look into the builtin function generation, nor into #defining and #undef'ing
> > target macros for the #pragmas.
> >
> > I did a bootstrap on C, C++, and Fortran front ends, and ran the regression
> > test for C and Fortran (the C++ library tests were all failing on the powerpc
> > when I took my snapshot). ?I only had one regression (gcc.dg/sms-3.c fails
> > under -m32 now when it used to pass for the selective scheduler). ?Is this ok
> > to install?
> >
>
> I don't think we should extend this feature before fixing it properly
> on existing
> target:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37565
However, I don't think your objection is valid in the case of the PowerPC
patches that I submitted, since these are only target options and not
optimization options. In fact, I don't modify any optimization options in the
powerpc port within the target option processing, except for the initial
processing of the command line options.
Besides as documented in the bug, TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE is now
available for backends to use if they need to adjust the target options after
the optimizations were changed. I didn't see it used in the i386 port, but
several other ports now use it.
--
Michael Meissner, IBM
5 Technology Place Drive, M/S 2757, Westford, MA 01886-3141, USA
meissner@linux.vnet.ibm.com