Message ID | 20220802122407.336092-2-aldyh@redhat.com |
---|---|
State | New, archived |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6a10:b5d6:b0:2b9:3548:2db5 with SMTP id v22csp2942418pxt; Tue, 2 Aug 2022 05:25:10 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uEZRl6Zyqw7vBSB4fTHKZsKFvGYaF7RcVd/CspdEwI31dvFc4XWL/ricFLAyCp7fK0Vs1V X-Received: by 2002:a17:907:6e1d:b0:72f:20ad:e1b6 with SMTP id sd29-20020a1709076e1d00b0072f20ade1b6mr16465317ejc.545.1659443110416; Tue, 02 Aug 2022 05:25:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659443110; cv=none; d=google.com; s=arc-20160816; b=1FYrNV1TVe3eszeUnBpfqxSLjqoFiMJoUby4brlsZoSwaiGdFRwQooCQ3rzF3Zz8eL cYQaoshhXyFNuE87PT3c8So83K51Uqf7teE03w60ywQq9puqsgzV9p1unUX7fhFu3hxr wF5ifEn+AMXVxORJXfM6g4LGe7sde0OqF3Is24yB931jctsRg9Ls4pHz2S33QnjYM85t KXZkKnQpL2Ue/uSN+gAvEu6f0LFyCxRzostG+A1QQ0IyYyHn65VJz4FsOITHd4E5n+zZ uVK3UsTx5kAq43JtocH9X5K91E7Z93llqyoIox0eA89QprqIakVNfFjrcGQ6qAFC3/fR 2Usw== 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:to:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=n/daTkfxFvGghNoZPq8nVOy2+de9D3iBrdggR2hm6mo=; b=zO2hYRgjrWOfzJp0tsm3ZEdSfdPs57wSjnqxGAI2cxcwsa/69i7zlqre53WV0L7hZV +64BCOdHYv+iyaIVPGcKnH6bvG5w5DEJSIwUh9QwGMXPVY2oL6Wh889c5js5+BIt1KR7 uEgkqZ0XwZ/mzxNtGcYlBaW4jgDKobYhLvBmI3xEncbkwyXf+yuPeRQywMqcW02qgQwc 9bBs3iu276XkTVxu0pjW522tFSkwPVtyEu/fGZy/pYMdZNzDk6s2/zRP0X20lLDdmeEh 7BSMOtrAujTsLt58zqfV4hTp22zihvdU3GNEu03eNYIPP9xtsHI7z9xLaI6N17ZR7459 hVww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=EJFewurM; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id q25-20020a50cc99000000b0043578ded62esi12272181edi.352.2022.08.02.05.25.10 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Aug 2022 05:25:10 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=EJFewurM; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 16B18385275F for <ouuuleilei@gmail.com>; Tue, 2 Aug 2022 12:24:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 16B18385275F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1659443099; bh=n/daTkfxFvGghNoZPq8nVOy2+de9D3iBrdggR2hm6mo=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=EJFewurMaCB+lkzlMvtcqwTca9XD1eiQyWgBp7ROajzWNflTejoNcqmCDF0LK8k7e HT+E5afCz9PRRsOv490V/xZ8uiIpUb6U18fGAxQVgUe3tFRUbfgNHeWlurPo4rNvZT Vsd4jpZ94gvlik2eBTTzgQzhJgDFhwNol703MO+A= 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 A35033852757 for <gcc-patches@gcc.gnu.org>; Tue, 2 Aug 2022 12:24:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A35033852757 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-584-jMr6u-kwMWy0BGCDhBotaQ-1; Tue, 02 Aug 2022 08:24:13 -0400 X-MC-Unique: jMr6u-kwMWy0BGCDhBotaQ-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 3E4731019C90; Tue, 2 Aug 2022 12:24:13 +0000 (UTC) Received: from abulafia.quesejoda.com (unknown [10.39.195.99]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E91BD40C1288; Tue, 2 Aug 2022 12:24:12 +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 272COBga336134 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 2 Aug 2022 14:24:11 +0200 Received: (from aldyh@localhost) by abulafia.quesejoda.com (8.17.1/8.17.1/Submit) id 272COBSL336133; Tue, 2 Aug 2022 14:24:11 +0200 To: GCC patches <gcc-patches@gcc.gnu.org> Subject: [PATCH] Limit ranger query in ipa-prop.cc to integrals. Date: Tue, 2 Aug 2022 14:24:06 +0200 Message-Id: <20220802122407.336092-2-aldyh@redhat.com> In-Reply-To: <20220802122407.336092-1-aldyh@redhat.com> References: <20220802122407.336092-1-aldyh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 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.7 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, 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?1740052219363287698?= X-GMAIL-MSGID: =?utf-8?q?1740052219363287698?= |
Series |
Limit ranger query in ipa-prop.cc to integrals.
|
|
Commit Message
Aldy Hernandez
Aug. 2, 2022, 12:24 p.m. UTC
ipa-* still works on legacy value_range's which only support integrals. This patch limits the query to integrals, as to not get a floating point range that can't exist in an irange. Will commit pending a final round of tests. gcc/ChangeLog: * ipa-prop.cc (ipa_compute_jump_functions_for_edge): Limit ranger query to integrals. --- gcc/ipa-prop.cc | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/gcc/ipa-prop.cc b/gcc/ipa-prop.cc index fb8f97397dc..ca5b9f31570 100644 --- a/gcc/ipa-prop.cc +++ b/gcc/ipa-prop.cc @@ -2303,6 +2303,10 @@ ipa_compute_jump_functions_for_edge (struct ipa_func_body_info *fbi, { if (TREE_CODE (arg) == SSA_NAME && param_type + /* Limit the ranger query to integral types as the rest + of this file uses value_range's, which only hold + integers and pointers. */ + && irange::supports_p (TREE_TYPE (arg)) && get_range_query (cfun)->range_of_expr (vr, arg) && !vr.undefined_p ()) {