Message ID | 20221111135318.235387-4-aldyh@redhat.com |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp752072wru; Fri, 11 Nov 2022 05:55:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf7yqUDNFyW2n/CR7KIZSkBTx/H89tMFKNca8wI8YYyAOTiOFqBJZcbcVpbt6Wpi9DgowG+s X-Received: by 2002:a17:906:6d89:b0:7ad:eb7f:d082 with SMTP id h9-20020a1709066d8900b007adeb7fd082mr1826138ejt.356.1668174913722; Fri, 11 Nov 2022 05:55:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668174913; cv=none; d=google.com; s=arc-20160816; b=baNnZ8CTucD7khjwTHle3TCcAkMgADmMRTvWIv0rTeyt3fzlRHoApqL5QgVH9RKbYp 5QDTPQqUn4kzJA7ew+be7SlZR1etMVYtDABo6uTEKMVzQJR9DWAYDuGZlzX00mcJj2H9 OihhrtyEA+KixZDhJ/fpP4Sig36QQYVT1wP7dx2OtkiEHoKyw+laRYK78isUgAVw/0ho 0EPJSxprZ8zBhNgcUWj8U6N/KRFP/p8Gc7dZvaAPcFvXFRz7fl0Efn1L1E2fYGMHpKKr 2Slxo2b4sMOZ5JWkBJAe5nnAmqVjyiMOBZW9Axo2liVzId8hEoyGizCe93LkOlHiGLIg r5ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=gKrelZnqscotaqS48wW31w13bmL54TPboW4shftBWI4=; b=KAijFug83L075uGmDfABBKch2Ix3kt/HocWRpuCXET7jay6LdlEnh7VHw93LHCKgU9 2TdDthletfKMk9urM6PhH0Y0pNDZ8cLDXc2kJ51NmXgt4KTCUbk6241DcRIK6AA/TM4C Wm6GQ4mgtSYjjmv1w+OQJ0n227RkXXjXuJbK1r3Al0KFWbUsnXuD1sPWpITONUkJmxYX 1/wg2ITrrYoQX7rRonyZGTDQCvEYa8/Gt2tdGL1mecc3RDIcIVTStoUeRTDLrq9BkZuv TUkIBR1p2VsWVrf00n5Gle5l2zRtKVpzKWrBthMu3pmML2DGWVj2aYVvGzW2Q9DwTrk5 pYFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=HPp9G95w; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id h3-20020a056402280300b00461b96334eesi2777011ede.500.2022.11.11.05.55.13 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 05:55:13 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=HPp9G95w; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 832633894C3C for <ouuuleilei@gmail.com>; Fri, 11 Nov 2022 13:54:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 832633894C3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668174861; bh=gKrelZnqscotaqS48wW31w13bmL54TPboW4shftBWI4=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=HPp9G95wrPdoBE3ts7XFu/XHkjAD6m2FfJ7n/7SaBIKOf2ok/wTNAYKsuyr8g5a6a fxUTaNAPKTpCAY/OAlTtoRIqN8LpIljNPTMzFTADJQeOVTxH/OYYyq0jakCDJzelNP pYn66s/omgjKG1WUdk2S0c8KSactt5uR+MMfjWgc= 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.129.124]) by sourceware.org (Postfix) with ESMTPS id 175F73858C5E for <gcc-patches@gcc.gnu.org>; Fri, 11 Nov 2022 13:53:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 175F73858C5E Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-611-xOEj5Ak3MDusOL2M9J8LQw-1; Fri, 11 Nov 2022 08:53:27 -0500 X-MC-Unique: xOEj5Ak3MDusOL2M9J8LQw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D4622101AA47 for <gcc-patches@gcc.gnu.org>; Fri, 11 Nov 2022 13:53:26 +0000 (UTC) Received: from abulafia.quesejoda.com (unknown [10.39.192.220]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6DB1040C1020; Fri, 11 Nov 2022 13:53:26 +0000 (UTC) Received: from abulafia.quesejoda.com (localhost [127.0.0.1]) by abulafia.quesejoda.com (8.17.1/8.17.1) with ESMTPS id 2ABDrPZB235459 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 11 Nov 2022 14:53:25 +0100 Received: (from aldyh@localhost) by abulafia.quesejoda.com (8.17.1/8.17.1/Submit) id 2ABDrPT4235458; Fri, 11 Nov 2022 14:53:25 +0100 To: GCC patches <gcc-patches@gcc.gnu.org> Cc: Andrew MacLeod <amacleod@redhat.com>, Aldy Hernandez <aldyh@redhat.com> Subject: [COMMITTED] [range-ops] Avoid unnecessary intersection in update_known_bitmask. Date: Fri, 11 Nov 2022 14:53:17 +0100 Message-Id: <20221111135318.235387-4-aldyh@redhat.com> In-Reply-To: <20221111135318.235387-1-aldyh@redhat.com> References: <20221111135318.235387-1-aldyh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-11.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_H2, SPF_HELO_NONE, SPF_NONE, TXREP 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Aldy Hernandez via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Aldy Hernandez <aldyh@redhat.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749208178171174895?= X-GMAIL-MSGID: =?utf-8?q?1749208178171174895?= |
Series |
[COMMITTED,range-ops] Avoid unnecessary intersection in update_known_bitmask.
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Aldy Hernandez
Nov. 11, 2022, 1:53 p.m. UTC
All the work for keeping the maybe nonzero masks up to date is being done by the bit-CCP code now. Any bitmask inherent in the range that range-ops may have calculated has no extra information, so the intersection is unnecessary. gcc/ChangeLog: * range-op.cc (update_known_bitmask): Avoid unnecessary intersection. --- gcc/range-op.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/gcc/range-op.cc b/gcc/range-op.cc index 9eec46441a3..0b01cf48fdf 100644 --- a/gcc/range-op.cc +++ b/gcc/range-op.cc @@ -89,10 +89,7 @@ update_known_bitmask (irange &r, tree_code code, bit_value_binop (code, sign, prec, &value, &mask, lh_sign, lh_prec, lh_value, lh_mask, rh_sign, rh_prec, rh_value, rh_mask); - - int_range<2> tmp (type); - tmp.set_nonzero_bits (value | mask); - r.intersect (tmp); + r.set_nonzero_bits (value | mask); } // Return the upper limit for a type.