public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-373] Merge irange::union/intersect into irange_union/intersect.
@ 2023-05-01  6:34 Aldy Hernandez
  0 siblings, 0 replies; only message in thread
From: Aldy Hernandez @ 2023-05-01  6:34 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:612d373005ad239001fd61f32950cb146e1084bc

commit r14-373-g612d373005ad239001fd61f32950cb146e1084bc
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Sun Feb 5 08:45:42 2023 +0100

    Merge irange::union/intersect into irange_union/intersect.
    
    gcc/ChangeLog:
    
            * value-range.cc (irange::irange_union): Rename to...
            (irange::union_): ...this.
            (irange::irange_intersect): Rename to...
            (irange::intersect): ...this.
            * value-range.h (irange::union_): Delete.
            (irange::intersect): Delete.

Diff:
---
 gcc/value-range.cc | 11 +++++++----
 gcc/value-range.h  | 14 --------------
 2 files changed, 7 insertions(+), 18 deletions(-)

diff --git a/gcc/value-range.cc b/gcc/value-range.cc
index a0e49df28f3..69b214ecc06 100644
--- a/gcc/value-range.cc
+++ b/gcc/value-range.cc
@@ -1246,11 +1246,13 @@ irange::irange_single_pair_union (const irange &r)
   return true;
 }
 
-// union_ for multi-ranges.
+// Return TRUE if anything changes.
 
 bool
-irange::irange_union (const irange &r)
+irange::union_ (const vrange &v)
 {
+  const irange &r = as_a <irange> (v);
+
   if (r.undefined_p ())
     return false;
 
@@ -1415,11 +1417,12 @@ irange::irange_contains_p (const irange &r) const
 }
 
 
-// Intersect for multi-ranges.  Return TRUE if anything changes.
+// Return TRUE if anything changes.
 
 bool
-irange::irange_intersect (const irange &r)
+irange::intersect (const vrange &v)
 {
+  const irange &r = as_a <irange> (v);
   gcc_checking_assert (undefined_p () || r.undefined_p ()
 		       || range_compatible_p (type (), r.type ()));
 
diff --git a/gcc/value-range.h b/gcc/value-range.h
index 10c44c5c062..6d108154dc1 100644
--- a/gcc/value-range.h
+++ b/gcc/value-range.h
@@ -170,8 +170,6 @@ protected:
   irange (tree *, unsigned);
 
    // In-place operators.
-  bool irange_union (const irange &);
-  bool irange_intersect (const irange &);
   void irange_set (tree, tree);
   void irange_set_anti_range (tree, tree);
   bool irange_contains_p (const irange &) const;
@@ -903,18 +901,6 @@ irange::upper_bound () const
   return upper_bound (pairs - 1);
 }
 
-inline bool
-irange::union_ (const vrange &r)
-{
-  return irange_union (as_a <irange> (r));
-}
-
-inline bool
-irange::intersect (const vrange &r)
-{
-  return irange_intersect (as_a <irange> (r));
-}
-
 // Set value range VR to a nonzero range of type TYPE.
 
 inline void

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

only message in thread, other threads:[~2023-05-01  6:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-01  6:34 [gcc r14-373] Merge irange::union/intersect into irange_union/intersect 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).