Tracking the source of an ARM miscompilation with gcc 4.6

2013-03-07 Thread Mike Hommey
Hi, At Mozilla, we've encountered a GCC 4.6 miscompilation in the ARMv6 build of Firefox for Android. We'd like to evaluate whether this bug is hitting us in more places than the one we spotted. To that end, we'd need to know what particular bug in GCC leads to this miscompilation. The attached f

Re: Tracking the source of an ARM miscompilation with gcc 4.6

2013-03-07 Thread Mike Hommey
On Thu, Mar 07, 2013 at 11:12:40AM +0100, Mikael Pettersson wrote: > Mike Hommey writes: > > On Thu, Mar 07, 2013 at 01:14:03AM -0800, Andrew Pinski wrote: > > > On Thu, Mar 7, 2013 at 12:33 AM, Mike Hommey wrote: > > > > On Thu, Mar 07, 2013 at 12:28:2

Re: Tracking the source of an ARM miscompilation with gcc 4.6

2013-03-07 Thread Mike Hommey
On Thu, Mar 07, 2013 at 11:34:30AM +0100, Mikael Pettersson wrote: > > > This test case is not self-contained. Please file a proper bug report > > > with a self-contained test case. > > > > It is, as long as you don't want to make a library or program out of it: > > > > $ arm-linux-android

FDO and LTO on ARM

2011-08-04 Thread Mike Hommey
Hi, We (Mozilla) are trying to get the best of the ARM toolchain for our Android build. I recently built an Android Native-code Development Kit with GCC 4.6.1 and binutils 2.21.53, instead of GCC 4.4.3 and binutils 2.19 that come with the default NDK. LTO doesn't work at all, I'm getting an ICE t

Re: FDO and LTO on ARM

2011-08-04 Thread Mike Hommey
On Thu, Aug 04, 2011 at 05:16:25PM +0200, Richard Guenther wrote: > -fprofile-use enables quite some optimizations that are even off for -O3 > which are -funroll-loops and -fpeel-loops, -ftracer and -funswitch-loops. > Those will all be increasing code-size (hopefully only for hot code pieces > tho

Re: FDO and LTO on ARM

2011-08-08 Thread Mike Hommey
On Fri, Aug 05, 2011 at 09:32:05AM +0200, Richard Guenther wrote: > Well, but unless your training coverage is 100% all parts with no coverage > get optimized with -O3 instead of -Os. And I bet coverage for mozilla > isn't even close to 100%. Thus I think recommending -O3 for FDO is > usually a b

Re: FDO and LTO on ARM

2011-08-08 Thread Mike Hommey
On Mon, Aug 08, 2011 at 11:25:56AM +0200, Mike Hommey wrote: > On Fri, Aug 05, 2011 at 09:32:05AM +0200, Richard Guenther wrote: > > Well, but unless your training coverage is 100% all parts with no coverage > > get optimized with -O3 instead of -Os. And I bet coverage for mozilla

Re: FDO and LTO on ARM

2011-08-08 Thread Mike Hommey
On Thu, Aug 04, 2011 at 08:51:41PM +0200, Jan Hubicka wrote: > > +Mark who has done size optimization tuning with FDO. > > > > On Thu, Aug 4, 2011 at 7:05 AM, Mike Hommey wrote: > > > Hi, > > > > > > We (Mozilla) are trying to get the best of the

Re: FDO and LTO on ARM

2011-08-09 Thread Mike Hommey
On Mon, Aug 08, 2011 at 05:25:23PM +0100, Jonathan Wakely wrote: > On 8 August 2011 13:20, Mike Hommey wrote: > > > > I unfortunately hit several problems with gcc 4.7 (latest snapshot). > > One is bug 50022 that I filed today. > > > > Another is the following err

Re: FDO and LTO on ARM

2011-08-09 Thread Mike Hommey
On Mon, Aug 08, 2011 at 02:20:37PM +0200, Mike Hommey wrote: > I unfortunately hit several problems with gcc 4.7 (latest snapshot). > One is bug 50022 that I filed today. > > Another is the following error in stlport headers: > error: invalid use of incomplete type 'std

Re: FDO and LTO on ARM

2011-08-11 Thread Mike Hommey
On Thu, Aug 04, 2011 at 04:05:25PM +0200, Mike Hommey wrote: > Hi, > > We (Mozilla) are trying to get the best of the ARM toolchain for our > Android build. I recently built an Android Native-code Development Kit > with GCC 4.6.1 and binutils 2.21.53, instead of GCC 4.4.3 and binut

Re: FDO and LTO on ARM

2011-08-17 Thread Mike Hommey
On Thu, Aug 11, 2011 at 09:27:23AM -0700, Xinliang David Li wrote: > > Maybe I have an idea as to why FDO doesn't work so well. Does the > > instrumentation code support running several times in parallel (as in, > > several processes with the instrumented code running concurrently)? > > gcc suppor

Re: FDO and LTO on ARM

2011-08-17 Thread Mike Hommey
On Wed, Aug 17, 2011 at 10:22:16AM -0700, Xinliang David Li wrote: > On Wed, Aug 17, 2011 at 8:35 AM, Mike Hommey wrote: > > On Thu, Aug 11, 2011 at 09:27:23AM -0700, Xinliang David Li wrote: > >> > Maybe I have an idea as to why FDO doesn't work so well. Does the &