From patchwork Fri Jul 28 20:37:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew MacLeod X-Patchwork-Id: 1814438 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=SFCGuxek; dkim-atps=neutral Received: from server2.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 ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RCKGX6hgGz1yYq for ; Sat, 29 Jul 2023 06:38:28 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 768583854C7A for ; Fri, 28 Jul 2023 20:38:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 768583854C7A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1690576706; bh=6HGtL79RXU33HPE3qEl5/dF+pCJyU2q97v5bTgD8pBo=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=SFCGuxekqJ1ZAjcZAuEdk8n2pXQGdAAaR0Xv2o+9bSVRrN/MQTsfq0OaDh03nneIT 2Cz+QGGSG1atLuOmKYvcqcKf9xE6mdyzMu0AkHPg+tQA9M6pxSI4g2L8F/PnP19+bu tJHWAqJJGr8yP8AdpmYWBv2OiII5un2ViHvTXDr8= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 6811B3854C5A for ; Fri, 28 Jul 2023 20:38:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6811B3854C5A Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-44-iycPx_7OO1GMIETnOPsA3A-1; Fri, 28 Jul 2023 16:38:00 -0400 X-MC-Unique: iycPx_7OO1GMIETnOPsA3A-1 Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-76c562323fbso326932685a.0 for ; Fri, 28 Jul 2023 13:37:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690576679; x=1691181479; h=subject:from:cc:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=twosOYdqkyxcfSqarxR2dVuflWHOl8bG3nDcOfaKukE=; b=gjf+8gHFDIfWYZ0hSPDo0CeqSlBjV3W+6Nd/6XYkzJ79lnMxi+XsinSqQhUa1sY3u8 bvYO5An+so2Z1DfMKWkoqhlXz8RAh0/60iKB8hr62szurbaEGYzGh9XrqR+CeRny4hVl QXjCMymHvDD+s1cubBNmk9biQ8Zn+WKpJlwS+tLB3VYrI/FSCPpO8zomvVE0VxpfuXU0 jcF5pkxRsmA/bOdkR4Pom6gois3OLpdvkL8sUMtMahPJYhSu9pya617Wuam6Ra3DmygY 1KUIRWgdYpI2hwMJOnrS90AucfdUiME4UBAhCJA7ATT6eglUEOqD4u7WYC+P9BDR4eu9 pdiA== X-Gm-Message-State: ABy/qLYchLZiv+DKcldLF4Ki1MpGqa/QR5YkmEPfs7ObYa2u9kZ2Lmrf waI6TMYU8TUFf4mAn12C52SAV4k/WrAIWXs0+kEtjnlRcJbom8JmZrMgVmkrTsz4kpF79+BP6oo 2ztQyQJos/5zU2Y0+8Gjnih/4X7k6+dN/strobTRnJw8DYqutjjQT08mEvZX2Vbf2siCIeAwOqQ sKtA== X-Received: by 2002:a05:620a:47b1:b0:76c:9427:5c54 with SMTP id dt49-20020a05620a47b100b0076c94275c54mr896061qkb.27.1690576678885; Fri, 28 Jul 2023 13:37:58 -0700 (PDT) X-Google-Smtp-Source: APBJJlEgmgvTiMzqeCpHFrQPO07Re7SfFWn6g6mHgFs03WW+G2UDFOyy9t1UTrfdebP4pmZ3E2cccQ== X-Received: by 2002:a05:620a:47b1:b0:76c:9427:5c54 with SMTP id dt49-20020a05620a47b100b0076c94275c54mr896048qkb.27.1690576678510; Fri, 28 Jul 2023 13:37:58 -0700 (PDT) Received: from ?IPV6:2607:fea8:51e0:8e00::8eb7? ([2607:fea8:51e0:8e00::8eb7]) by smtp.gmail.com with ESMTPSA id w5-20020a05620a148500b0076639dfca8dsm1381993qkj.80.2023.07.28.13.37.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 Jul 2023 13:37:57 -0700 (PDT) Message-ID: <1d587ae8-a3ba-77b3-20c3-ebb92174d1a6@redhat.com> Date: Fri, 28 Jul 2023 16:37:56 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 To: gcc-patches Cc: "hernandez, aldy" Subject: [COMMITTED] PR tree-optimization/110205 -Fix some warnings X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: , X-Patchwork-Original-From: Andrew MacLeod via Gcc-patches From: Andrew MacLeod Reply-To: Andrew MacLeod Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" This patch simply fixes the code up a little to remove potential warnings. Bootstrapped on x86_64-pc-linux-gnu with no regressions. Pushed. Andrew From 7905c071c35070fff3397b1e24f140c128c08e64 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Mon, 10 Jul 2023 13:58:22 -0400 Subject: [PATCH 1/3] Fix some warnings PR tree-optimization/110205 * gimple-range-cache.h (ranger_cache::m_estimate): Delete. * range-op-mixed.h (operator_bitwise_xor::op1_op2_relation_effect): Add final override. * range-op.cc (operator_lshift): Add missing final overrides. (operator_rshift): Ditto. --- gcc/gimple-range-cache.h | 1 - gcc/range-op-mixed.h | 2 +- gcc/range-op.cc | 44 ++++++++++++++++++---------------------- 3 files changed, 21 insertions(+), 26 deletions(-) diff --git a/gcc/gimple-range-cache.h b/gcc/gimple-range-cache.h index 93d16294d2e..a0f436b5723 100644 --- a/gcc/gimple-range-cache.h +++ b/gcc/gimple-range-cache.h @@ -137,7 +137,6 @@ private: void exit_range (vrange &r, tree expr, basic_block bb, enum rfd_mode); bool edge_range (vrange &r, edge e, tree name, enum rfd_mode); - phi_analyzer *m_estimate; vec m_workback; class update_list *m_update; }; diff --git a/gcc/range-op-mixed.h b/gcc/range-op-mixed.h index 3cb904f9d80..b623a88cc71 100644 --- a/gcc/range-op-mixed.h +++ b/gcc/range-op-mixed.h @@ -574,7 +574,7 @@ public: tree type, const irange &op1_range, const irange &op2_range, - relation_kind rel) const; + relation_kind rel) const final override; void update_bitmask (irange &r, const irange &lh, const irange &rh) const final override; private: diff --git a/gcc/range-op.cc b/gcc/range-op.cc index 615e5fe0036..19fdff0eb64 100644 --- a/gcc/range-op.cc +++ b/gcc/range-op.cc @@ -2394,22 +2394,21 @@ class operator_lshift : public cross_product_operator using range_operator::fold_range; using range_operator::op1_range; public: - virtual bool op1_range (irange &r, tree type, - const irange &lhs, - const irange &op2, - relation_trio rel = TRIO_VARYING) const; - virtual bool fold_range (irange &r, tree type, - const irange &op1, - const irange &op2, - relation_trio rel = TRIO_VARYING) const; + virtual bool op1_range (irange &r, tree type, const irange &lhs, + const irange &op2, relation_trio rel = TRIO_VARYING) + const final override; + virtual bool fold_range (irange &r, tree type, const irange &op1, + const irange &op2, relation_trio rel = TRIO_VARYING) + const final override; virtual void wi_fold (irange &r, tree type, const wide_int &lh_lb, const wide_int &lh_ub, - const wide_int &rh_lb, const wide_int &rh_ub) const; + const wide_int &rh_lb, + const wide_int &rh_ub) const final override; virtual bool wi_op_overflows (wide_int &res, tree type, const wide_int &, - const wide_int &) const; + const wide_int &) const final override; void update_bitmask (irange &r, const irange &lh, const irange &rh) const final override { update_known_bitmask (r, LSHIFT_EXPR, lh, rh); } @@ -2421,27 +2420,24 @@ class operator_rshift : public cross_product_operator using range_operator::op1_range; using range_operator::lhs_op1_relation; public: - virtual bool fold_range (irange &r, tree type, - const irange &op1, - const irange &op2, - relation_trio rel = TRIO_VARYING) const; + virtual bool fold_range (irange &r, tree type, const irange &op1, + const irange &op2, relation_trio rel = TRIO_VARYING) + const final override; virtual void wi_fold (irange &r, tree type, const wide_int &lh_lb, const wide_int &lh_ub, const wide_int &rh_lb, - const wide_int &rh_ub) const; + const wide_int &rh_ub) const final override; virtual bool wi_op_overflows (wide_int &res, tree type, const wide_int &w0, - const wide_int &w1) const; - virtual bool op1_range (irange &, tree type, - const irange &lhs, - const irange &op2, - relation_trio rel = TRIO_VARYING) const; - virtual relation_kind lhs_op1_relation (const irange &lhs, - const irange &op1, - const irange &op2, - relation_kind rel) const; + const wide_int &w1) const final override; + virtual bool op1_range (irange &, tree type, const irange &lhs, + const irange &op2, relation_trio rel = TRIO_VARYING) + const final override; + virtual relation_kind lhs_op1_relation (const irange &lhs, const irange &op1, + const irange &op2, relation_kind rel) + const final override; void update_bitmask (irange &r, const irange &lh, const irange &rh) const final override { update_known_bitmask (r, RSHIFT_EXPR, lh, rh); } -- 2.40.1