From patchwork Mon Oct 11 10:58:36 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: 46067 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 376DE3857C48 for ; Mon, 11 Oct 2021 10:58:53 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id DDC293858D28 for ; Mon, 11 Oct 2021 10:58:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DDC293858D28 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-out1.suse.de (Postfix) with ESMTPS id 16E2821B7A; Mon, 11 Oct 2021 10:58:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1633949917; 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=FliTUUdmtTzNZNRBAS5CW3XkMXjOQlpzBK3tL+NTgs4=; b=NO+5aa1iwPN76sHOrHEeFR+ahPTnonaFH0spJwsDqz6yNIrSxnkY2MAty7M7wVQRfOyXBo gz/omAzaRehMObEdR49/fBOvZz7nHALEHkJdI1lq2+mELPSEg0zWR8E5Rl+WwrCsDOnjLy j/XS0WoowLey0ap/uiDqNvJx7XjqrNE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1633949917; 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=FliTUUdmtTzNZNRBAS5CW3XkMXjOQlpzBK3tL+NTgs4=; b=ahm9k1ONdPzJY7aQiBrHvr67tQVKaFK5v4M5nYpFTriXlLh8IpOxYlrTgS3/7d/8QDzes5 wJMNEPEg60c/BtDw== 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 01A6313C63; Mon, 11 Oct 2021 10:58:36 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id wqMDO9wYZGHcSAAAMHmgww (envelope-from ); Mon, 11 Oct 2021 10:58:36 +0000 Message-ID: <352a1bb2-5b39-4185-50c7-1ae62d1f0080@suse.cz> Date: Mon, 11 Oct 2021 12:58:36 +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] Remove usage of IRA_REGION_AUTODETECT 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" Similar patch, let's rely on OPTION_SET_P and not a default options value. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: * common.opt: Remove usage of IRA_REGION_AUTODETECT. * flag-types.h (enum ira_region): Likewise. * toplev.c (process_options): Use OPTION_SET_P instead of IRA_REGION_AUTODETECT. --- gcc/common.opt | 2 +- gcc/flag-types.h | 4 ---- gcc/toplev.c | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/gcc/common.opt b/gcc/common.opt index 52693e226d2..59ecc9fbdf7 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -1923,7 +1923,7 @@ EnumValue Enum(ira_algorithm) String(priority) Value(IRA_ALGORITHM_PRIORITY) fira-region= -Common Joined RejectNegative Enum(ira_region) Var(flag_ira_region) Init(IRA_REGION_AUTODETECT) Optimization +Common Joined RejectNegative Enum(ira_region) Var(flag_ira_region) Init(IRA_REGION_ONE) Optimization -fira-region=[one|all|mixed] Set regions for IRA. Enum diff --git a/gcc/flag-types.h b/gcc/flag-types.h index 5bd1f771c8b..ae0b216e8a3 100644 --- a/gcc/flag-types.h +++ b/gcc/flag-types.h @@ -191,10 +191,6 @@ enum ira_region IRA_REGION_ONE, IRA_REGION_ALL, IRA_REGION_MIXED, - /* This value means that there were no options -fira-region on the - command line and that we should choose a value depending on the - used -O option. */ - IRA_REGION_AUTODETECT }; /* The options for excess precision. */ diff --git a/gcc/toplev.c b/gcc/toplev.c index 81748b1152a..b878234f3f2 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1319,7 +1319,7 @@ process_options (bool no_backend) } /* One region RA really helps to decrease the code size. */ - if (flag_ira_region == IRA_REGION_AUTODETECT) + if (!OPTION_SET_P (flag_ira_region)) flag_ira_region = optimize_size || !optimize ? IRA_REGION_ONE : IRA_REGION_MIXED;