From patchwork Thu Oct 29 10:53:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 1390047 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CMMkK27tSz9sRk for ; Thu, 29 Oct 2020 21:53:43 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 49E983984FDC; Thu, 29 Oct 2020 10:53:40 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 56A7D3854821 for ; Thu, 29 Oct 2020 10:53:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 56A7D3854821 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mliska@suse.cz X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 3F91DAC9A; Thu, 29 Oct 2020 10:53:37 +0000 (UTC) From: =?utf-8?q?Martin_Li=C5=A1ka?= Subject: [PATCH][pushed] opts: Sanity check for param names. To: gcc-patches@gcc.gnu.org Message-ID: Date: Thu, 29 Oct 2020 11:53:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 Content-Language: en-US X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jakub Jelinek , Jan Hubicka Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Hello. This provides new sanity check: options.c:1:2: error: #error Parameter option name '-param-ipa-jump-function-lookups=' must start with '-param=' 1 | #error Parameter option name '-param-ipa-jump-function-lookups=' must start with '-param=' | ^~~~~ Apart form that, I fix the affected option. I'm going to install the patch. Martin 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.