public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r14-373] Merge irange::union/intersect into irange_union/intersect.
Date: Mon,  1 May 2023 06:34:03 +0000 (GMT)	[thread overview]
Message-ID: <20230501063403.9DA8838555B3@sourceware.org> (raw)

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

                 reply	other threads:[~2023-05-01  6:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230501063403.9DA8838555B3@sourceware.org \
    --to=aldyh@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).