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: Christian Borntraeger <borntraeger at de dot ibm dot com>
- To: "Fang, Changpeng" <Changpeng dot Fang at amd dot com>
- Cc: Mark Mitchell <mark at codesourcery 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>, "rguenther at suse dot de" <rguenther at suse dot de>, "sebpop at gmail dot com" <sebpop at gmail dot com>, Zdenek Dvorak <rakdver at kam dot mff dot cuni dot cz>, Maxim Kuvyrkov <maxim at codesourcery dot com>
- Date: Wed, 23 Jun 2010 08:05:55 +0200
- Subject: Re: [PATCH] Enabling Software Prefetching by Default at -O3
- References: <D4C76825A6780047854A11E93CDE84D02F7743@SAUSEXMBP01.amd.com> <4C1D2304.5080007@codesourcery.com> <D4C76825A6780047854A11E93CDE84D02F774E@SAUSEXMBP01.amd.com>
Am Mittwoch 23 Juni 2010, 00:05:57 schrieb Fang, Changpeng:
> Hi, Mark:
>
> >> It also might be worth to investigate if overriding the parameters per
> >> -mtune=XXX results in an overall win for -fprefetch-loop-arrays. We did
> >> that on s390 since the default values were not ideal
>
> >Yes, that might be a good idea for i7.
>
> >But, in the meantime, I think we should get a version of the patch that
> >turns on prefetching on AMD CPUs with -O3. There's no reason to demand
> >consistency for all CPUs and it clearly benefits the AMD CPUs.
> >Changpeng, would you please submit a patch that activates this
> >optimization only with tuning for AMD CPUs?
>
> It seems I have a problem in setting prefetching default at -O3 only for AMD CPUs.
> When we know it is AMD CPUS after the command line options have been parsed,
> we don't know whether -fno-prefetch-loop-arrays has been specified in the command line
> or not. If we turn on prefetching at -O3, then we could not explicitly turn it off if we want.
>
> What I want is something like:
> if (!OPTION_SET_P (flag_prefetch_loop_arrays))
> flag_prefetch_loop_arrays = 1;
I think having an OPTION_SET_P (or maybe name that FLAG_SET_P) makes a lot of sense and
would match the PARAM_SET_P way of doing things.
Christian