public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r15-146] Add hashing support for prange.
@ 2024-05-04  8:27 Aldy Hernandez
  0 siblings, 0 replies; only message in thread
From: Aldy Hernandez @ 2024-05-04  8:27 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:7c1b136630790eb34d57c45d9a816b32fd904e3f

commit r15-146-g7c1b136630790eb34d57c45d9a816b32fd904e3f
Author: Aldy Hernandez <aldyh@redhat.com>
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 <prange> (v))
+    {
+      const prange &r = as_a <prange> (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 <frange> (v))
     {
       const frange &r = as_a <frange> (v);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-05-04  8:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-04  8:27 [gcc r15-146] Add hashing support for prange Aldy Hernandez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).