From bafcf452c79da54dd0b96764990d11b64f5df03b Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 29 Oct 2020 11:51:49 +0100 Subject: [PATCH] opts: Sanity check for param names. gcc/ChangeLog: * optc-gen.awk: Check that params start with -param=. * params.opt: Fix ipa-jump-function-lookups. --- gcc/optc-gen.awk | 3 +++ gcc/params.opt | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/optc-gen.awk b/gcc/optc-gen.awk index 73a96bac9e7..9e7e9970395 100644 --- a/gcc/optc-gen.awk +++ b/gcc/optc-gen.awk @@ -104,6 +104,9 @@ for (i = 0; i < n_opts; i++) { enabledby_negarg = nth_arg(3, enabledby_arg); lang_enabled_by(enabledby_langs, enabledby_name, enabledby_posarg, enabledby_negarg); } + + if (flag_set_p("Param", flags[i]) && !(opts[i] ~ "^-param=")) + print "#error Parameter option name '" opts[i] "' must start with '-param='" } diff --git a/gcc/params.opt b/gcc/params.opt index 563c67c11f2..7bac39a9d58 100644 --- a/gcc/params.opt +++ b/gcc/params.opt @@ -253,7 +253,7 @@ The size of translation unit that IPA-CP pass considers large. Common Joined UInteger Var(param_ipa_cp_value_list_size) Init(8) Param Optimization Maximum size of a list of values associated with each parameter for interprocedural constant propagation. --param-ipa-jump-function-lookups= +-param=ipa-jump-function-lookups= Common Joined UInteger Var(param_ipa_jump_function_lookups) Init(8) Param Optimization Maximum number of statements visited during jump function offset discovery. -- 2.30.2