Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-06-02 Thread
Hello. The patch has moved to http://lists.freedesktop.org/archives/mesa-dev/2016-June/119257.html ( http://patchwork.freedesktop.org/series/8176/) ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-06-01 Thread Chuck Atkins
> > > With gcc 5.3.1 I end up with lib{GL,OSMesa}.so @ 44M and > > libswrAVX{,2}.so @ 70M. With flto turned on it drops WAY down to > > lib{GL,OSMesa}.so @ 13M and libswrAVX{,2}.so @ 18M > > I assume those numbers are including debugging symbols? How do stripped > binaries compare? > Silly me, I

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-06-01 Thread Marc Dietrich
Am Mittwoch, 1. Juni 2016, 12:36:15 CEST schrieb Eero Tamminen: > Hi, > > On 31.05.2016 21:43, ⚛ wrote: > > On Tue, May 31, 2016 at 8:30 PM, Aaron Watry wrote: > >> Given the header that it's failing in, I removed the --enable-glx-tls > >> flag, and then things built

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-06-01 Thread Eero Tamminen
Hi, On 31.05.2016 21:43, ⚛ wrote: On Tue, May 31, 2016 at 8:30 PM, Aaron Watry wrote: Given the header that it's failing in, I removed the --enable-glx-tls flag, and then things built successfully. mesa.spec in

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-06-01 Thread Michel Dänzer
On 01.06.2016 00:07, Chuck Atkins wrote: > > With gcc 5.3.1 I end up with lib{GL,OSMesa}.so @ 44M and > libswrAVX{,2}.so @ 70M. With flto turned on it drops WAY down to > lib{GL,OSMesa}.so @ 13M and libswrAVX{,2}.so @ 18M I assume those numbers are including debugging symbols? How do stripped

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-05-31 Thread Aaron Watry
On Tue, May 31, 2016 at 4:57 PM, Martin Peres wrote: > On 31/05/16 10:42, Eero Tamminen wrote: > >> Hi, >> >> On 30.05.2016 20:57, Rob Clark wrote: >> >>> On Mon, May 30, 2016 at 1:39 PM, Matt Turner wrote: >>> On Mon, May 30, 2016 at 10:28 AM, ⚛

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-05-31 Thread Martin Peres
On 31/05/16 21:26, ⚛ wrote: On Tue, May 31, 2016 at 8:04 PM, Chuck Atkins wrote: Agreed. I've been building on both Fedora and EL7 for the past few months with -flto and haven't seen any issues with the files in mapi. You reported that you get build failures with

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-05-31 Thread Martin Peres
On 31/05/16 10:42, Eero Tamminen wrote: Hi, On 30.05.2016 20:57, Rob Clark wrote: On Mon, May 30, 2016 at 1:39 PM, Matt Turner wrote: On Mon, May 30, 2016 at 10:28 AM, ⚛ <0xe2.0x9a.0...@gmail.com> wrote: This patch enables compilation with -flto. The performance

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-05-31 Thread
On Tue, May 31, 2016 at 8:30 PM, Aaron Watry wrote: > > Given the header that it's failing in, I removed the --enable-glx-tls flag, > and then things built successfully. mesa.spec in http://download.clearlinux.org/releases/8490/clear/source/SRPMS/mesa-11.2.99.1-21.src.rpm

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-05-31 Thread Aaron Watry
On Mon, May 30, 2016 at 3:31 PM, Emil Velikov wrote: > On 30 May 2016 at 21:10, Jason Ekstrand wrote: > >> On Mon, May 30, 2016 at 12:27 PM, Emil Velikov >> wrote: >> >>> Hi there, >>> On 30 May 2016 at 18:28, ⚛

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-05-31 Thread
On Tue, May 31, 2016 at 8:04 PM, Chuck Atkins wrote: > Agreed. I've been building on both Fedora and EL7 for the past few months > with -flto and haven't seen any issues with the files in mapi. You reported > that you get build failures with gcc for this though so what

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-05-31 Thread Chuck Atkins
On Tue, May 31, 2016 at 1:57 PM, ⚛ <0xe2.0x9a.0...@gmail.com> wrote: > On Mon, May 30, 2016 at 9:27 PM, Emil Velikov > wrote: > > - Are you use the mapi hunk is needed ? last time I've tried (some > > months ago, copying the tweaks from the Clearlinux spec file [2]) >

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-05-31 Thread
On Mon, May 30, 2016 at 9:27 PM, Emil Velikov wrote: > - Are you use the mapi hunk is needed ? last time I've tried (some > months ago, copying the tweaks from the Clearlinux spec file [2]) > things built without issues. I tried Clearlinux today, but I failed to

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-05-31 Thread Chuck Atkins
I only build with swr and llvmpipe. I generally don't have use for the GPU drivers so my configure line is typically: --enable-opengl --disable-gles1 --disable-gles2 --disable-va --disable-gbm --disable-xvmc --disable-vdpau --enable-shared-glapi --disable-dri --with-dri-drivers=

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-05-31 Thread Emil Velikov
On 31 May 2016 at 15:34, Chuck Atkins wrote: > I've been using lto for the past several weeks not for performance reasons > but to reduce the resulting binary size which has grown to be rather > substantial. I usually set "-flto -ffat-lto-objects >

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-05-31 Thread Chuck Atkins
I've been using lto for the past several weeks not for performance reasons but to reduce the resulting binary size which has grown to be rather substantial. I usually set "-flto -ffat-lto-objects -flto-odr-type-merging" in the CFLAGS and CXXFLAGS env vars prior to configure and have yet to

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-05-31 Thread Eero Tamminen
Hi, On 30.05.2016 20:57, Rob Clark wrote: On Mon, May 30, 2016 at 1:39 PM, Matt Turner wrote: On Mon, May 30, 2016 at 10:28 AM, ⚛ <0xe2.0x9a.0...@gmail.com> wrote: This patch enables compilation with -flto. The performance benefits of LTO (GCC 4.9 & 6.1) are about 1% for

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-05-30 Thread Jason Ekstrand
On May 30, 2016 1:31 PM, "Emil Velikov" wrote: > > On 30 May 2016 at 21:10, Jason Ekstrand wrote: >> >> On Mon, May 30, 2016 at 12:27 PM, Emil Velikov wrote: >>> >>> Hi there, >>> On 30 May 2016 at 18:28, ⚛

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-05-30 Thread Emil Velikov
On 30 May 2016 at 21:10, Jason Ekstrand wrote: > On Mon, May 30, 2016 at 12:27 PM, Emil Velikov > wrote: > >> Hi there, >> On 30 May 2016 at 18:28, ⚛ <0xe2.0x9a.0...@gmail.com> wrote: >> > This patch enables compilation with -flto. >> > >> > The

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-05-30 Thread Jason Ekstrand
On Mon, May 30, 2016 at 12:27 PM, Emil Velikov wrote: > Hi there, > On 30 May 2016 at 18:28, ⚛ <0xe2.0x9a.0...@gmail.com> wrote: > > This patch enables compilation with -flto. > > > > The performance benefits of LTO (GCC 4.9 & 6.1) are about 1% for > glxgears. > >

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-05-30 Thread Emil Velikov
Hi there, On 30 May 2016 at 18:28, ⚛ <0xe2.0x9a.0...@gmail.com> wrote: > This patch enables compilation with -flto. > > The performance benefits of LTO (GCC 4.9 & 6.1) are about 1% for glxgears. > Performance changes in OpenGL games haven't been measured yet, my feeling is > that they are

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-05-30 Thread Pierre Moreau
Ok, I found the answer to my question regarding the `-fno-lto`. IMHO that should be in the commit message, since the patch only checks for availability and disables LTO in one case, never enabling it explicitely. Please ignore my previous mail. Pierre On 11:06 AM - May 30 2016, Matt Turner

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-05-30 Thread
On Mon, May 30, 2016 at 8:07 PM, Pierre Moreau wrote: > On 07:28 PM - May 30 2016, ⚛ wrote: >> +if COMPILER_UNDERSTANDS_LTO >> +CFLAGS += -fno-lto >> +CXXFLAGS += -fno-lto > > This should be `-flto` if I’m not mistaken. > > Pierre -fno-lto is correct because GCC has issues

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-05-30 Thread Matt Turner
On Mon, May 30, 2016 at 11:02 AM, ⚛ <0xe2.0x9a.0...@gmail.com> wrote: > > On Mon, May 30, 2016 at 7:39 PM, Matt Turner wrote: >> >> On Mon, May 30, 2016 at 10:28 AM, <0xe2.0x9a.0...@gmail.com> wrote: >> > This patch enables compilation with -flto. >> > >> > The performance

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-05-30 Thread Pierre Moreau
On 07:28 PM - May 30 2016, ⚛ wrote: > This patch enables compilation with -flto. > > The performance benefits of LTO (GCC 4.9 & 6.1) are about 1% for glxgears. > Performance changes in OpenGL games haven't been measured yet, my feeling > is that they are negligible. > diff --git a/configure.ac

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-05-30 Thread Rob Clark
On Mon, May 30, 2016 at 1:39 PM, Matt Turner wrote: > On Mon, May 30, 2016 at 10:28 AM, ⚛ <0xe2.0x9a.0...@gmail.com> wrote: >> This patch enables compilation with -flto. >> >> The performance benefits of LTO (GCC 4.9 & 6.1) are about 1% for glxgears. >> Performance changes in

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-05-30 Thread Matt Turner
On Mon, May 30, 2016 at 10:28 AM, ⚛ <0xe2.0x9a.0...@gmail.com> wrote: > This patch enables compilation with -flto. > > The performance benefits of LTO (GCC 4.9 & 6.1) are about 1% for glxgears. > Performance changes in OpenGL games haven't been measured yet, my feeling is > that they are

[Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-05-30 Thread
This patch enables compilation with -flto. The performance benefits of LTO (GCC 4.9 & 6.1) are about 1% for glxgears. Performance changes in OpenGL games haven't been measured yet, my feeling is that they are negligible. diff --git a/configure.ac b/configure.ac index fc0b1db..e84a1ad 100644 ---