From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 B30723856090 for ; Mon, 10 Oct 2022 12:50:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B30723856090 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665406205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bs3FS6OdzDZHcmyBF/1e2oxkxpDH4+1lI3fna5XDpEo=; b=Dbvph12rbCHaBZ1FXG0KhQDUgxB+YYescTOCJpcvzTx+PqhYREdDl4IBVr9x/qMe75hB/7 FlCLW33Xy1zcWmFZtNu3rywVWwj8ksNLQY1uYL7CRuOtHCm6jsLgzSlHbKYEwb64wuWyHd Ud1HY/f8EnVACzmA5InJemxKW+f+lCU= 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-249-KcxinWjsM5GA6RiCjBL-Fg-1; Mon, 10 Oct 2022 08:49:56 -0400 X-MC-Unique: KcxinWjsM5GA6RiCjBL-Fg-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 421423C025CE for ; Mon, 10 Oct 2022 12:49:56 +0000 (UTC) Received: from abulafia.quesejoda.com (unknown [10.39.193.126]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C6083404CD91; Mon, 10 Oct 2022 12:49: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 29ACnruw154174 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 10 Oct 2022 14:49:53 +0200 Received: (from aldyh@localhost) by abulafia.quesejoda.com (8.17.1/8.17.1/Submit) id 29ACnqH6154173; Mon, 10 Oct 2022 14:49:52 +0200 From: Aldy Hernandez To: GCC patches Cc: Andrew MacLeod , Aldy Hernandez Subject: [COMMITTED] Return non-legacy ranges in range.h. Date: Mon, 10 Oct 2022 14:49:42 +0200 Message-Id: <20221010124946.154152-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=-12.3 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_LOW,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 List-Id: int_range<1> is a legacy range (think anti ranges, legacy VRP, etc). There is a penalty for converting anything built with <1> to non-legacy. Since most of the uses of these functions are now ranger, we can save a miniscule amount of time by converting them to non-legacy. gcc/ChangeLog: * range.h (range_true): Return int_range<2>. (range_false): Same. (range_true_and_false): Same. --- gcc/range.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/range.h b/gcc/range.h index 5c70c66566c..8138d6f5515 100644 --- a/gcc/range.h +++ b/gcc/range.h @@ -32,7 +32,7 @@ static inline int_range<1> range_true (tree type) { unsigned prec = TYPE_PRECISION (type); - return int_range<1> (type, wi::one (prec), wi::one (prec)); + return int_range<2> (type, wi::one (prec), wi::one (prec)); } // Return an irange instance that is a boolean FALSE. @@ -41,7 +41,7 @@ static inline int_range<1> range_false (tree type) { unsigned prec = TYPE_PRECISION (type); - return int_range<1> (type, wi::zero (prec), wi::zero (prec)); + return int_range<2> (type, wi::zero (prec), wi::zero (prec)); } // Return an irange that covers both true and false. @@ -50,7 +50,7 @@ static inline int_range<1> range_true_and_false (tree type) { unsigned prec = TYPE_PRECISION (type); - return int_range<1> (type, wi::zero (prec), wi::one (prec)); + return int_range<2> (type, wi::zero (prec), wi::one (prec)); } #endif // GCC_RANGE_H -- 2.37.3