From: Uros Bizjak <ubizjak@gmail.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: [COMMITTED] reginfo: Change return type of predicate functions from int to bool
Date: Mon, 5 Jun 2023 17:36:25 +0200 [thread overview]
Message-ID: <CAFULd4a-cRfW8N=MUkt1Gmy17_+gmc0X0VyOSVQ5P-p9emWLYQ@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 280 bytes --]
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
[-- Attachment #2: reginfo.diff.txt --]
[-- Type: text/plain, Size: 1400 bytes --]
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);
reply other threads:[~2023-06-05 15:36 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='CAFULd4a-cRfW8N=MUkt1Gmy17_+gmc0X0VyOSVQ5P-p9emWLYQ@mail.gmail.com' \
--to=ubizjak@gmail.com \
--cc=gcc-patches@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).