On Thu, Nov 6, 2014 at 12:53 PM, James Greenhalgh <james.greenha...@arm.com> wrote: > > On Fri, Oct 31, 2014 at 10:46:12AM +0000, Richard Biener wrote: >> On Wed, Oct 29, 2014 at 3:39 PM, James Greenhalgh wrote: >> >> I suppose I could port any target with a definition of MOVE_RATIO to >> >> override the default parameter value in their option overriding code, >> >> but that makes this a very large patch set (many targets define >> >> MOVE_RATIO). >> >> >> >> Is this an avenue worth exploring? I agree the very special target >> >> hook is not ideal. >> > >> > Hi, >> > >> > Did you have any further thoughts on this? I'm still unable to come up >> > with a way to set these parameters which allows them to default to their >> > current (MOVE_RATIO derived) values. >> > >> > If the only way to make this work is to add code to >> > TARGET_OPTION_OVERRIDE for all targets that define MOVE_RATIO, then I >> > suppose I can do that, but I'd prefer a neater way to make it work, if >> > you can think of one. >> >> Maybe instead of putting the code in opts.c put it right before we call >> targetm.target_option.override () in toplev.c:process_options. With >> a comment on why it cannot be in opts.c. > > Ah, that makes sense. The (much simplified) patch then looks like > this... > > Bootstrapped on x86_64, ARM and AArch64 with no issues. > > OK?
Ok. Thanks, Richard. > Thanks, > James > > --- > gcc/ > > 2014-11-06 James Greenhalgh <james.greenha...@arm.com> > > * params.def (sra-max-scalarization-size-Ospeed): New. > (sra-max-scalarization-size-Osize): Likewise. > * doc/invoke.texi (sra-max-scalarization-size-Ospeed): Document. > (sra-max-scalarization-size-Osize): Likewise. > * toplev.c (process_options): Set default values for new > parameters. > * tree-sra.c (analyze_all_variable_accesses): Use new parameters. > * targhooks.c (get_move_ratio): Remove static designator. > * target.h (get_move_ratio): Declare.