From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2136) id 0A49838449C7; Sat, 4 May 2024 08:27:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0A49838449C7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1714811267; bh=fo0tlnVxINvKXjhaXVKiMT8SJg+Zr+yPQ6adShNTiA0=; h=From:To:Subject:Date:From; b=sU+C0vUZMt1wDPegcjk/k1IWC7Yp98rFa13vYqcYlUa6gWdackxFOSrnH0QjFNmyu mH9RLHSqWtpd2sV+ckc6TRmkk3JYhvrTpVq4FblTiwr2oNQX2bQcAJqjqK+CRUQTHT BiZT4x28XWcdxs+x7cMVstFySl59y2TA/ffSem+w= 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 r15-146] Add hashing support for prange. X-Act-Checkin: gcc X-Git-Author: Aldy Hernandez X-Git-Refname: refs/heads/master X-Git-Oldrev: f859996a976ca185f371a8ed395e9c8e459e05b0 X-Git-Newrev: 7c1b136630790eb34d57c45d9a816b32fd904e3f Message-Id: <20240504082747.0A49838449C7@sourceware.org> Date: Sat, 4 May 2024 08:27:47 +0000 (GMT) List-Id: https://gcc.gnu.org/g:7c1b136630790eb34d57c45d9a816b32fd904e3f commit r15-146-g7c1b136630790eb34d57c45d9a816b32fd904e3f Author: Aldy Hernandez Date: Wed Mar 20 06:39:07 2024 +0100 Add hashing support for prange. gcc/ChangeLog: * value-range.cc (add_vrange): Add prange support. Diff: --- gcc/value-range.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gcc/value-range.cc b/gcc/value-range.cc index 84113ccfbd0..62170a438bf 100644 --- a/gcc/value-range.cc +++ b/gcc/value-range.cc @@ -346,6 +346,22 @@ add_vrange (const vrange &v, inchash::hash &hstate, hstate.add_wide_int (bm.mask ()); return; } + if (is_a (v)) + { + const prange &r = as_a (v); + if (r.varying_p ()) + hstate.add_int (VR_VARYING); + else + { + hstate.add_int (VR_RANGE); + hstate.add_wide_int (r.lower_bound ()); + hstate.add_wide_int (r.upper_bound ()); + irange_bitmask bm = r.get_bitmask (); + hstate.add_wide_int (bm.value ()); + hstate.add_wide_int (bm.mask ()); + } + return; + } if (is_a (v)) { const frange &r = as_a (v);