From patchwork Thu Oct 14 07:49:30 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: 46198 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 D96D53858006 for ; Thu, 14 Oct 2021 07:50:40 +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 4EA713858414 for ; Thu, 14 Oct 2021 07:49:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4EA713858414 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 04A8E20289; Thu, 14 Oct 2021 07:49:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1634197771; 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=vRPegsiAJbAJWV9BqC7na4H0MPC1PM7xwB5oQ+N9oQI=; b=CvVNx2IESObvk8S4sgv/YYLJkAK4u1j1ZJdxh+P4ZAnwq9kucNx+iNZo8wy84hERPvWNDh jCu2cyDDUaRAdbkavXEyNoL2iW0LSO7IYIoDbBHBNdKiRJzuy0mGMgTsxlaELlfi/rRVnA SE383Kt63hQQyLDVlrtLso7EeU7go1g= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1634197771; 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=vRPegsiAJbAJWV9BqC7na4H0MPC1PM7xwB5oQ+N9oQI=; b=tbqA7R8Ukn7Y44w3LGQa+pe9g3B6Ry4jYH19uxx/lDVsqOMeCgzOoCivqLs/ykCHzYNWpf N49ws9v0YSPLl5Dg== 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 E215D13D3F; Thu, 14 Oct 2021 07:49:30 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id IN0KNgrhZ2HAJgAAMHmgww (envelope-from ); Thu, 14 Oct 2021 07:49:30 +0000 Message-ID: <2f57b5b5-3894-29b4-0e20-725bf273b496@suse.cz> Date: Thu, 14 Oct 2021 09:49:30 +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] rs6000: Remove unnecessary option manipulation. 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" Hello. There's follow up flag handling simplification based on 4ab51fa0e1705201420d87b601bd92bc643b3d52. Patch can bootstrap on ppc64le-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: * config/rs6000/rs6000.c (rs6000_override_options_after_change): Do not set flag_rename_registers, it's already default behavior. Use EnabledBy for unroll_only_small_loops. * config/rs6000/rs6000.opt: Use EnabledBy for unroll_only_small_loops. --- gcc/config/rs6000/rs6000.c | 7 +------ gcc/config/rs6000/rs6000.opt | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index acba4d9f26c..40146179e06 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -3472,13 +3472,8 @@ rs6000_override_options_after_change (void) /* Explicit -funroll-loops turns -munroll-only-small-loops off, and turns -frename-registers on. */ if ((OPTION_SET_P (flag_unroll_loops) && flag_unroll_loops) - || (OPTION_SET_P (flag_unroll_all_loops) - && flag_unroll_all_loops)) + || (OPTION_SET_P (flag_unroll_all_loops && flag_unroll_all_loops))) { - if (!OPTION_SET_P (unroll_only_small_loops)) - unroll_only_small_loops = 0; - if (!OPTION_SET_P (flag_rename_registers)) - flag_rename_registers = 1; if (!OPTION_SET_P (flag_cunroll_grow_size)) flag_cunroll_grow_size = 1; } diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt index 9d7878f144a..faeb7423ca7 100644 --- a/gcc/config/rs6000/rs6000.opt +++ b/gcc/config/rs6000/rs6000.opt @@ -546,7 +546,7 @@ Target Undocumented Var(rs6000_optimize_swaps) Init(1) Save Analyze and remove doubleword swaps from VSX computations. munroll-only-small-loops -Target Undocumented Var(unroll_only_small_loops) Init(0) Save +Target Undocumented Var(unroll_only_small_loops) Init(0) Save EnabledBy(funroll-loops) ; Use conservative small loop unrolling. mpower9-misc