This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][RFC] Param to options conversion (demo).
- From: Martin Liška <mliska at suse dot cz>
- To: Richard Biener <richard dot guenther at gmail dot com>, Jan Hubicka <hubicka at ucw dot cz>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 31 Oct 2019 14:16:08 +0100
- Subject: Re: [PATCH][RFC] Param to options conversion (demo).
- References: <f4d7d1f7-0a7d-a2bd-8d7d-4e01c4f91309@suse.cz>
On 10/31/19 2:01 PM, Martin Liška wrote:
> Hi.
>
> Based on the discussion with Honza and Richard I'm sending a proposal
> for conversion of param machinery into the existing option machinery.
> Our motivation for the change is to provide per function param values,
> similarly what 'Optimization' keyword does for options.
>
> Right now, we support the following format:
> gcc --param=lto-partitions=4 /tmp/main.c -c
>
> And so that I decided to name newly the params like:
>
> -param=ipa-sra-ptr-growth-factor=
> Common Joined UInteger Var(param_ipa_sra_ptr_growth_factor) Init(2) Param Optimization
> Maximum allowed growth of number and total size of new parameters
> that ipa-sra replaces a pointer to an aggregate with.
>
> And I learnt decoder to parse '--param' 'name=value' as '--param=name=value'. Doing that
> the transformation works. Help provides reasonable output as well:
>
> $ ./xgcc -B. --param predictable-branch-outcome=5 /tmp/main.c -c -Q --help=param
> The --param option recognizes the following as parameters:
> --param=ipa-sra-ptr-growth-factor= 2
> --param=predictable-branch-outcome=<0,50> 5
>
> Thoughts?
> Thanks,
> Martin
>
> ---
> gcc/common.opt | 18 +++++++++++-------
> gcc/ipa-sra.c | 3 +--
> gcc/opt-functions.awk | 3 ++-
> gcc/opts-common.c | 9 +++++++++
> gcc/opts.c | 36 ------------------------------------
> gcc/params.def | 10 ----------
> gcc/predict.c | 4 ++--
> 7 files changed, 25 insertions(+), 58 deletions(-)
>
>
I forgot to add gcc-patches to To.
Martin