This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Enabling Software Prefetching by Default at -O3
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: Richard Guenther <richard dot guenther at gmail dot com>, Sebastian Pop <sebpop at gmail dot com>, Richard Guenther <rguenther at suse dot de>, "Fang, Changpeng" <Changpeng dot Fang at amd dot com>, Mark Mitchell <mark at codesourcery dot com>, Christian Borntraeger <borntraeger at de dot ibm dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "H.J. Lu" <hjl dot tools at gmail dot com>, Zdenek Dvorak <rakdver at kam dot mff dot cuni dot cz>, Maxim Kuvyrkov <maxim at codesourcery dot com>
- Date: Sat, 26 Jun 2010 17:04:21 +0200
- Subject: Re: [PATCH] Enabling Software Prefetching by Default at -O3
- References: <D4C76825A6780047854A11E93CDE84D02F7743@SAUSEXMBP01.amd.com> <AANLkTinutwOlwcSgK7PFpXdEAoi957jmbxZk5naMfW9r@mail.gmail.com> <AANLkTimAawmDJgc5suPrCuitiV0JrB0vseOz43zpR0o4@mail.gmail.com> <201006192104.54441.borntraeger@de.ibm.com> <4C1D2304.5080007@codesourcery.com> <D4C76825A6780047854A11E93CDE84D02F7750@SAUSEXMBP01.amd.com> <alpine.LNX.2.00.1006251137270.1429@zhemvz.fhfr.qr> <AANLkTintOWwwjTXtXjF6w4WMTjSdhvsBmDpGbjcKv60c@mail.gmail.com> <AANLkTinlloOKcFmjTFV--KkxKCVvr5CSPVvkxzjY34CC@mail.gmail.com> <20100626145545.GD23703@atrey.karlin.mff.cuni.cz>
> > On Fri, Jun 25, 2010 at 8:25 PM, Sebastian Pop <sebpop@gmail.com> wrote:
> > > On Fri, Jun 25, 2010 at 04:37, Richard Guenther <rguenther@suse.de> wrote:
> > >> On Thu, 24 Jun 2010, Fang, Changpeng wrote:
> > >>
> > >>> Hi,
> > >>>
> > >>> Attached is the version of the patch that turns prefetching on at -O3 for AMD cpus
> > >>> only. As discussed elsewhere in this thread, we use tri-state for -fprefetch-loop-arrays.
> > >>> If this flag is not explicitly set, ?(for -O3) we turn it on in gcc/config/i386/i386.c
> > >>> (override_options).
> > >>>
> > >>> Is this OK to commit now?
> > >>
> > >> Ok.
> > >>
> > >
> > > Committed r161391.
> >
> > This may have regressed scimark sparse matmult by 20% on AMD Fam8
> > at -O3 -ffast-math -funroll-loops -march=native.
> ... and also about 2.6% SPECFP regression along with 8% code size growth in 32bit mode
> http://gcc.opensuse.org/SPEC/CFP/sb-frescobaldi.suse.de-head-64-32o-32bit/recent.html
> http://gcc.opensuse.org/SPEC/CFP/sb-frescobaldi.suse.de-head-64-32o-32bit/size.html
I think the reason why we see regression in 32bit run only is that 32bit run use -march=native
while 64bit run uses default arch. So it indeed looks like prefetching change.
Honza