From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2136) id D63BF3856960; Mon, 10 Oct 2022 12:50:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D63BF3856960 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665406243; bh=+ggjrciJ9oCH0yhuvh7r5XhmdKe9GKdhjSYo8uQRbBc=; h=From:To:Subject:Date:From; b=bxqUbCPxBL9rrOqHbBRdPJLub0OOYxRN1gEPcqRXVYM2U4eO856wpbZ9eXwlmidts eVEux/vQf7+/IEINUulzc6hnZ3g5P86Mg21q4oDVcPVUuw/dCdoD0gWGVfwK/I+ceJ EAngTeEmugGqi1dtVrl3n6b+MsG+gE61M6iT+jck= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Aldy Hernandez To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-3193] Return non-legacy ranges in range.h. X-Act-Checkin: gcc X-Git-Author: Aldy Hernandez X-Git-Refname: refs/heads/master X-Git-Oldrev: 2bd112dee7f9786a0484d9281899a9bb0b2ae57d X-Git-Newrev: 8b6bcedc88d54415cbc018b3f7fc2bc20dcd4800 Message-Id: <20221010125043.D63BF3856960@sourceware.org> Date: Mon, 10 Oct 2022 12:50:43 +0000 (GMT) List-Id: https://gcc.gnu.org/g:8b6bcedc88d54415cbc018b3f7fc2bc20dcd4800 commit r13-3193-g8b6bcedc88d54415cbc018b3f7fc2bc20dcd4800 Author: Aldy Hernandez Date: Mon Oct 10 13:43:56 2022 +0200 Return non-legacy ranges in range.h. 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. Diff: --- 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