From patchwork Mon Oct 11 10:58:00 2021 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: 46066 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2AD1D3857813 for ; Mon, 11 Oct 2021 10:58:18 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id E2C7E3858D28 for ; Mon, 11 Oct 2021 10:58:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E2C7E3858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id B4E9020051; Mon, 11 Oct 2021 10:58:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1633949880; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=49V4/mCEOREJVD8Z0BpLHZm1ok9A+RzQQAXRzKS+8K0=; b=PQhzu9vctOaEHr+15UiwNQ3lNk1Swv/8aOy440uYgwe5xLj0uFIzqCRNsqpsxtTDt9fyMs LBzR6LBh+LS6uDNw3jlpXO5lfmQI8pNmKhKhiO/jv1gS+OHA8VS8rKPW6TOenXbpQlAgdy Arm4l5dehcVXrBBuQXR2nG/q0qRB2KQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1633949880; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=49V4/mCEOREJVD8Z0BpLHZm1ok9A+RzQQAXRzKS+8K0=; b=5KcU7BA3YDZ/sMwgXr8ytXbUFiBfKXRC7svXOR8YRP1QZuyPxaivU5hQzInqsHl/pNFP/x SkCJN4VFpToVsBCQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 9BDFB13C63; Mon, 11 Oct 2021 10:58:00 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id w0X5JLgYZGF2SAAAMHmgww (envelope-from ); Mon, 11 Oct 2021 10:58:00 +0000 Message-ID: <7b67904e-af64-a584-8706-f81e7d8482b8@suse.cz> Date: Mon, 11 Oct 2021 12:58:00 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.2 From: =?utf-8?q?Martin_Li=C5=A1ka?= Subject: [PATCH] opts: Remove AUTODETECT_VALUE usage. To: gcc-patches@gcc.gnu.org Content-Language: en-US X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" The patch is about using OPTION_SET_P instead of a default option value set in common.opt. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: * common.opt: Remove Init(2) for some options. * toplev.c (process_options): Do not use AUTODETECT_VALUE, but use rather OPTION_SET_P. --- gcc/common.opt | 6 +++--- gcc/toplev.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gcc/common.opt b/gcc/common.opt index 59ecc9fbdf7..4099effcc80 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -2399,7 +2399,7 @@ Common Var(flag_live_range_shrinkage) Init(0) Optimization Relief of register pressure through live range shrinkage. frename-registers -Common Var(flag_rename_registers) Init(2) Optimization +Common Var(flag_rename_registers) Optimization Perform a register renaming optimization pass. fschedule-fusion @@ -2797,7 +2797,7 @@ Common Ignore Does nothing. Preserved for backward compatibility. ftree-cselim -Common Var(flag_tree_cselim) Init(2) Optimization +Common Var(flag_tree_cselim) Optimization Transform condition stores into unconditional ones. ftree-switch-conversion @@ -3158,7 +3158,7 @@ Common Var(flag_value_profile_transformations) Optimization Use expression value profiles in optimizations. fweb -Common Var(flag_web) Init(2) Optimization +Common Var(flag_web) Optimization Construct webs and split unrelated uses of single variable. ftree-builtin-call-dce diff --git a/gcc/toplev.c b/gcc/toplev.c index b878234f3f2..167feac2583 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1332,10 +1332,10 @@ process_options (bool no_backend) } /* web and rename-registers help when run after loop unrolling. */ - if (flag_web == AUTODETECT_VALUE) + if (!OPTION_SET_P (flag_web)) flag_web = flag_unroll_loops; - if (flag_rename_registers == AUTODETECT_VALUE) + if (!OPTION_SET_P (flag_rename_registers)) flag_rename_registers = flag_unroll_loops; if (flag_non_call_exceptions) @@ -1598,7 +1598,7 @@ process_options (bool no_backend) debug_inline_points = 0; } - if (flag_tree_cselim == AUTODETECT_VALUE) + if (!OPTION_SET_P (flag_tree_cselim)) { if (HAVE_conditional_move) flag_tree_cselim = 1;