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] Add attribute((target("..."))) and pragma target to PowerPC


On Mon, Nov 1, 2010 at 9:20 AM, Michael Meissner
<meissner@linux.vnet.ibm.com> wrote:
> 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.
>

If you exam each bug report closely, you may find
TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE
may not solve all problems. Some issues are fundamental, which can't be solved
by one macro.

-- 
H.J.


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