diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2024-03-20 06:39:07 +0100 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2024-05-04 10:25:50 +0200 |
commit | 7c1b136630790eb34d57c45d9a816b32fd904e3f (patch) | |
tree | 1b53f0601d68c36b7598283e56363132d8eaf01d /gcc/value-range.cc | |
parent | f859996a976ca185f371a8ed395e9c8e459e05b0 (diff) | |
download | gcc-7c1b136630790eb34d57c45d9a816b32fd904e3f.zip gcc-7c1b136630790eb34d57c45d9a816b32fd904e3f.tar.gz gcc-7c1b136630790eb34d57c45d9a816b32fd904e3f.tar.bz2 |
Add hashing support for prange.
gcc/ChangeLog:
* value-range.cc (add_vrange): Add prange support.
Diffstat (limited to 'gcc/value-range.cc')
-rw-r--r-- | gcc/value-range.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/value-range.cc b/gcc/value-range.cc index 84113cc..62170a4 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); |