From patchwork Wed Oct 12 06:50:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aldy Hernandez X-Patchwork-Id: 1948 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp2467020wrs; Tue, 11 Oct 2022 23:53:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM68Hq1RnuX/5xAa6PaLCdKBaZO06SzzAV0Z3KRuc/eUgsz1TmBm1hIozMGERxVHTmPov0Q6 X-Received: by 2002:a17:906:974f:b0:780:4a3c:d179 with SMTP id o15-20020a170906974f00b007804a3cd179mr22376041ejy.289.1665557622557; Tue, 11 Oct 2022 23:53:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665557622; cv=none; d=google.com; s=arc-20160816; b=sxYeqV+3rMXhIbPYjf6MmAK46c0OJvaE8bNgmOazDDX5Gm9Pfars+/7uqZY6IB2WBx J4ZmyiJqa1YMkOVOcAONGMhOTzR3BoB36P5hSB0JYoAqI8+w331km/AV80ix8KfDD6DF CTqaJ423MIh4BkqSMkdwHUJ5LSJw/iQ0fp3YhY1moZ2EtVQJZi2EM/FeT0ovZlzgMeFH lwImRSG3IcfJaAljQG6cdLltLzscyoPvOSkZXrl9yRSLA5sGw+Nm5UDVIjmtSP9hlim+ 1ayK+Gi8Bk+N9k3zruwsOsQhSrbhElLh9z4kletB5VQfcVBlB6pQUHmCMSmgS7WvUxXT zg9w== 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=PqtZL/MVfFVJLVVNqyjZ090JbcHGiTJ0XOU+J6LdJxY=; b=gVvg+AtPHgOFkTNC+w18F6TPxNhDywtltbqFzk4xp7Tj/ZJhd+9OiHKr5grWCCHfgW q3/OaOHtFKAnU2elRqQchfuVpL8Bt8F6VTzcRcw1+ZBvFnUTw0n0aFsqWUzfwrES/MjC WTz7kG66ZvV/LMBIXO/Cx0La+DqrwSxHPtCH3ZMvRAoI2bOqwQDXAo+9xFWW/rTMLFRx 2WuGU9h3H0vwZFHLZdwBSWI7Or2ev+CTnfIrDz4gOfuyPSFhNf6nwFbzfkiKxPf82nRR 3I/2+uQ7yTAntS7kC4uzK0hxXmqIRypVbBKb6j6YroI49sdH1KZH49WzoY4Tq8CA2RcI gzFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=d6GoV2ei; 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 e4-20020aa7d7c4000000b0044e987f3a34si13728418eds.489.2022.10.11.23.53.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Oct 2022 23:53:42 -0700 (PDT) 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=d6GoV2ei; 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 163BE385086F for ; Wed, 12 Oct 2022 06:52:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 163BE385086F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665557563; bh=PqtZL/MVfFVJLVVNqyjZ090JbcHGiTJ0XOU+J6LdJxY=; 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=d6GoV2eieG7trR1pf7X9VU7q1VFvro9V6aDJcuEVc4lyezzs+mTkO1IzKH8XaTnxW 82uoGtFuxZhisf/spWY4h5Rp919YM5frP33LmsQaAi4J4viGVQRy/WtDLxnCkkpY+7 am2kv7b2IsnN+rX1ALD3ks+CHYVj6zHF6zaMQYew= 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 72EAC385B839 for ; Wed, 12 Oct 2022 06:51:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 72EAC385B839 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-275-4h8XTlbNOli_hOiVyRY4tA-1; Wed, 12 Oct 2022 02:50:59 -0400 X-MC-Unique: 4h8XTlbNOli_hOiVyRY4tA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 86432101A5AD for ; Wed, 12 Oct 2022 06:50:59 +0000 (UTC) Received: from abulafia.quesejoda.com (unknown [10.39.193.77]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 26D36C23F84; Wed, 12 Oct 2022 06:50:55 +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 29C6ortJ412946 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 12 Oct 2022 08:50:53 +0200 Received: (from aldyh@localhost) by abulafia.quesejoda.com (8.17.1/8.17.1/Submit) id 29C6orgs412945; Wed, 12 Oct 2022 08:50:53 +0200 To: GCC patches Subject: [COMMITTED] Add an frange(type) constructor analogous to the irange version. Date: Wed, 12 Oct 2022 08:50:47 +0200 Message-Id: <20221012065050.412900-2-aldyh@redhat.com> In-Reply-To: <20221012065050.412900-1-aldyh@redhat.com> References: <20221012065050.412900-1-aldyh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.5 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Aldy Hernandez via Gcc-patches From: Aldy Hernandez Reply-To: Aldy Hernandez Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746463749584884737?= X-GMAIL-MSGID: =?utf-8?q?1746463749584884737?= gcc/ChangeLog: * value-range.h (frange::frange): Add constructor taking type. --- gcc/value-range.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gcc/value-range.h b/gcc/value-range.h index 07a2067898c..9d630e40f78 100644 --- a/gcc/value-range.h +++ b/gcc/value-range.h @@ -281,6 +281,7 @@ public: frange (); frange (const frange &); frange (tree, tree, value_range_kind = VR_RANGE); + frange (tree type); frange (tree type, const REAL_VALUE_TYPE &min, const REAL_VALUE_TYPE &max, value_range_kind = VR_RANGE); static bool supports_p (const_tree type) @@ -1059,6 +1060,13 @@ frange::frange (const frange &src) *this = src; } +inline +frange::frange (tree type) +{ + m_discriminator = VR_FRANGE; + set_varying (type); +} + // frange constructor from REAL_VALUE_TYPE endpoints. inline