[Mesa-dev] [PATCH] replace file specific compiler optimizationwith inline attibute

Matt Turner mattst88 at gmail.com
Sun Sep 14 21:12:57 PDT 2014


On Fri, Sep 12, 2014 at 1:02 AM, Marc Dietrich <marvin24 at gmx.de> wrote:
> Am Donnerstag, 11. September 2014, 08:52:39 schrieb Matt Turner:
>> On Thu, Sep 11, 2014 at 6:58 AM, Marc Dietrich <marvin24 at gmx.de> wrote:
>> > File specific optimization as used for
>> > src/mesa/main/streaming-load-memcpy.c currently will cause problems with
>> > LTO in the future
>> > (see: https://bugs.freedesktop.org/show_bug.cgi?id=83669). Replace it with
>> > in-file target specification.
>>
>> This is only available in gcc-4.8 and later.
>
> no, it's there since 4.4 (4.8 has some runtime auto selection for c++ AFAIK).
> See https://gcc.gnu.org/gcc-4.4/changes.html (C family).

Oh, interesting. This sounds like a good plan then. Looks to me like
gcc-4.3 is the only version that supports -msse4* and doesn't support
this attribute, and I think everyone would be okay with requiring
>=gcc-4.4 to compile i965_dri.so.

Perhaps we could use this with our code using SSSE3 intrinsics as well.

I'll investigate. Thanks for bringing this up and correcting me about
gcc's support!

> I guess we need a fallback for compilers supporting -msse4.1 (icc only?) and
> not __attribute__ (target).

Meh. Maybe it can inspire other compiler authors to maintain
compatibility with gcc. But I'm predicting dissent..


More information about the mesa-dev mailing list