public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-1545] reginfo: Change return type of predicate functions from int to bool
@ 2023-06-05 15:23 Uros Bizjak
  0 siblings, 0 replies; only message in thread
From: Uros Bizjak @ 2023-06-05 15:23 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:d015c658a01961e6e52d902ef405cfe49d1be7d0

commit r14-1545-gd015c658a01961e6e52d902ef405cfe49d1be7d0
Author: Uros Bizjak <ubizjak@gmail.com>
Date:   Mon Jun 5 14:38:52 2023 +0200

    reginfo: Change return type of predicate functions from int to bool
    
    gcc/ChangeLog:
    
            * rtl.h (reg_classes_intersect_p): Change return type from int to bool.
            (reg_class_subset_p): Ditto.
            * reginfo.cc (reg_classes_intersect_p): Ditto.
            (reg_class_subset_p): Ditto.

Diff:
---
 gcc/reginfo.cc | 8 ++++----
 gcc/rtl.h      | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/gcc/reginfo.cc b/gcc/reginfo.cc
index 24f612bed59..d472a35946a 100644
--- a/gcc/reginfo.cc
+++ b/gcc/reginfo.cc
@@ -1134,9 +1134,9 @@ reg_scan_mark_refs (rtx x, rtx_insn *insn)
 }
 \f
 
-/* Return nonzero if C1 is a subset of C2, i.e., if every register in C1
+/* Return true if C1 is a subset of C2, i.e., if every register in C1
    is also in C2.  */
-int
+bool
 reg_class_subset_p (reg_class_t c1, reg_class_t c2)
 {
   return (c1 == c2
@@ -1145,8 +1145,8 @@ reg_class_subset_p (reg_class_t c1, reg_class_t c2)
 				   reg_class_contents[(int) c2]));
 }
 
-/* Return nonzero if there is a register that is in both C1 and C2.  */
-int
+/* Return true if there is a register that is in both C1 and C2.  */
+bool
 reg_classes_intersect_p (reg_class_t c1, reg_class_t c2)
 {
   return (c1 == c2
diff --git a/gcc/rtl.h b/gcc/rtl.h
index af9fb882bf2..3f0af780634 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -4292,8 +4292,8 @@ extern HARD_REG_SET eliminable_regset;
 extern void mark_elimination (int, int);
 
 /* In reginfo.cc */
-extern int reg_classes_intersect_p (reg_class_t, reg_class_t);
-extern int reg_class_subset_p (reg_class_t, reg_class_t);
+extern bool reg_classes_intersect_p (reg_class_t, reg_class_t);
+extern bool reg_class_subset_p (reg_class_t, reg_class_t);
 extern void globalize_reg (tree, int);
 extern void init_reg_modes_target (void);
 extern void init_regs (void);

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

only message in thread, other threads:[~2023-06-05 15:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-05 15:23 [gcc r14-1545] reginfo: Change return type of predicate functions from int to bool Uros Bizjak

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).