[Mesa-dev] [PATCH] replace file specific compiler optimizationwith inline attibute
Marc Dietrich
marvin24 at gmx.de
Fri Sep 12 01:02:22 PDT 2014
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).
I guess we need a fallback for compilers supporting -msse4.1 (icc only?) and
not __attribute__ (target). I have the feeling that the whole cpu specific
optimization is often tied closely to the compiler used.
I wonder if there is a better solution we could choose, especially now that
only one function causes problems. I remember a project called liboil (which
is abandoned now) which provided some cpu specific accel paths. Also Mesa
starts to use pixmap for certain routines.
Marc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140912/8f4c1aae/attachment-0001.sig>
More information about the mesa-dev
mailing list