From patchwork Fri Aug 5 12:07:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aldy Hernandez X-Patchwork-Id: 398 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6a10:20da:b0:2d3:3019:e567 with SMTP id n26csp146946pxc; Fri, 5 Aug 2022 05:08:04 -0700 (PDT) X-Google-Smtp-Source: AA6agR4khCvU47q94QIAsZhqD1mjamyL2DPoZl+kMiyFytajTzh9LkTZAM6k4W3YwxCiinpPXxux X-Received: by 2002:a17:906:e8f:b0:730:9480:9728 with SMTP id p15-20020a1709060e8f00b0073094809728mr4989624ejf.99.1659701284351; Fri, 05 Aug 2022 05:08:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659701284; cv=none; d=google.com; s=arc-20160816; b=dxfmc25nYfi3UmIZdSNrkGET5gcmkweQ7fQyYh4pUYRyMgoRdtSMT8fhqKCFSyXJ7N PUDAHnnHq+48yTdccDU9K4FGrUBCQKj9KyTLvgaD2qjN7xB6fpqLJl7lT013L9MyTOuA bM0zfRNCckbdQWusRwFtJ9a8GHZF1/mxsg+ohH+F+yzTtNNdmz8JW/YEB7ea+6K8EqCE iWet2IrFK1kv0jdbDcKi/PzO4tWx+FImYvjqgzs84pPENlyIc1s/rlAPLoA4Rh/tORBY mwqQMXNfclAzqq11QTvD0eb/LQ1eYlEQkSIUetnWfOlQF/7SPb5uiHZc7eoYmkLQHSNY O0OA== 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:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=FNX0lOurM/HPodmZTurtqzCm3lGsh4CwwYfhE9mFDoc=; b=NsjFwSW4PjbjcoXZr56FcVgOaHmI1mUQDhm767yXOHQyfWcDaGh1YBMwU4sFieuNSg rCp5Ismr7+PEmUoI7V0q3SN4AfzXUuzLKmJ7baSEycHAFLyTDno0ebkGPt96a1e5OMzn UqGACWQUKQ/PM8FpAjijwPvneJCDYJKS2TO94XCPILD6T1IPf+uDn4SE5fMYjwmyt8T0 2tZLxIflFlxtGnj4ji7oPuLMzGzhxKouPgeN0ehTf2eHq/6pHWyFQtwgObxn7Uow2Pbp e0mAPznXXCn39iiRTrYkCfDIhKORmLfL1JQMHhnnDeWdIbaQ59ijuzAn+MErw79YO8bd LcKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=m7tswf+v; 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 oz9-20020a1709077d8900b00709af14e386si1886579ejc.205.2022.08.05.05.08.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Aug 2022 05:08:04 -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=m7tswf+v; 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 321743858C53 for ; Fri, 5 Aug 2022 12:08:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 321743858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1659701283; bh=FNX0lOurM/HPodmZTurtqzCm3lGsh4CwwYfhE9mFDoc=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=m7tswf+vvTvo0kyvFWTgZT6E0C3G1mP3qFEA5uluqYuij962FpjObYN9AdnAXKEcL K1NLPkdrSIF+uRmP4wY+6OX7EFOyrj+GqE75s11Bnh9f9RCkTN4grSKrMhSWR8LdtR 3ZG5IWaKmkJ9K9ZShfFTCe4xQXVsUaVbRzrm7p4I= 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 E83F93858C53 for ; Fri, 5 Aug 2022 12:07:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E83F93858C53 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-60-QJi_el1JMIOQYLePGzYmAg-1; Fri, 05 Aug 2022 08:07:18 -0400 X-MC-Unique: QJi_el1JMIOQYLePGzYmAg-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 80233382ECCA for ; Fri, 5 Aug 2022 12:07:18 +0000 (UTC) Received: from abulafia.quesejoda.com (unknown [10.39.193.154]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1B408492C3B; Fri, 5 Aug 2022 12:07:17 +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 275C7FQD079155 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 5 Aug 2022 14:07:15 +0200 Received: (from aldyh@localhost) by abulafia.quesejoda.com (8.17.1/8.17.1/Submit) id 275C7Etq079154; Fri, 5 Aug 2022 14:07:14 +0200 To: GCC patches Subject: [COMMITTED] Inline unsupported_range constructor. Date: Fri, 5 Aug 2022 14:07:12 +0200 Message-Id: <20220805120712.79141-1-aldyh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.2 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, 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: 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?1740322933551664940?= X-GMAIL-MSGID: =?utf-8?q?1740322933551664940?= An unsupported_range temporary is instantiated in every Value_Range for completeness sake and should be mostly a NOP. However, it's showing up in the callgrind stats, because it's not inline. This fixes the oversight. PR tree-optimization/106514 gcc/ChangeLog: * value-range.cc (unsupported_range::unsupported_range): Move... * value-range.h (unsupported_range::unsupported_range): ...here. (unsupported_range::set_undefined): New. --- gcc/value-range.cc | 6 ------ gcc/value-range.h | 10 +++++++++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/gcc/value-range.cc b/gcc/value-range.cc index dd5a4303908..a2273f540e8 100644 --- a/gcc/value-range.cc +++ b/gcc/value-range.cc @@ -248,12 +248,6 @@ irange::set_nonnegative (tree type) set (build_int_cst (type, 0), TYPE_MAX_VALUE (type)); } -unsupported_range::unsupported_range () -{ - m_discriminator = VR_UNKNOWN; - set_undefined (); -} - void frange::accept (const vrange_visitor &v) const { diff --git a/gcc/value-range.h b/gcc/value-range.h index 305e2cae7e6..856947d23dd 100644 --- a/gcc/value-range.h +++ b/gcc/value-range.h @@ -250,7 +250,15 @@ private: class unsupported_range : public vrange { public: - unsupported_range (); + unsupported_range () + { + m_discriminator = VR_UNKNOWN; + set_undefined (); + } + virtual void set_undefined () final override + { + m_kind = VR_UNDEFINED; + } virtual void accept (const vrange_visitor &v) const override; };