diff mbox series

[COMMITTED] reginfo: Change return type of predicate functions from int to bool

Message ID CAFULd4a-cRfW8N=MUkt1Gmy17_+gmc0X0VyOSVQ5P-p9emWLYQ@mail.gmail.com
State New
Headers show
Series [COMMITTED] reginfo: Change return type of predicate functions from int to bool | expand

Commit Message

Uros Bizjak June 5, 2023, 3:36 p.m. UTC
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.

Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.

Uros
diff mbox series

Patch

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)
 }
 
 
-/* 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);