From: Uros Bizjak <ubizjak@gmail.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: [COMMITTED] reload1: Change return type of predicate function from int to bool
Date: Tue, 6 Jun 2023 19:22:57 +0200 [thread overview]
Message-ID: <CAFULd4YRwe_anb9ozkoKh0nWXKC86w-O76u9G+ruSuvjEPUU+g@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 280 bytes --]
gcc/ChangeLog:
* rtl.h (function_invariant_p): Change return type from int to bool.
* reload1.cc (function_invariant_p): Change return type from
int to bool and adjust function body accordingly.
Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.
Uros.
[-- Attachment #2: reload1.diff.txt --]
[-- Type: text/plain, Size: 1151 bytes --]
diff --git a/gcc/reload1.cc b/gcc/reload1.cc
index 9ec2cb9baf4..9ba822d1ff7 100644
--- a/gcc/reload1.cc
+++ b/gcc/reload1.cc
@@ -5949,14 +5949,14 @@ free_for_value_p (int regno, machine_mode mode, int opnum,
return 1;
}
-/* Return nonzero if the rtx X is invariant over the current function. */
+/* Return true if the rtx X is invariant over the current function. */
/* ??? Actually, the places where we use this expect exactly what is
tested here, and not everything that is function invariant. In
particular, the frame pointer and arg pointer are special cased;
pic_offset_table_rtx is not, and we must not spill these things to
memory. */
-int
+bool
function_invariant_p (const_rtx x)
{
if (CONSTANT_P (x))
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 4c993e82708..988691f5710 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -4307,7 +4307,7 @@ extern void fix_register (const char *, int, int);
extern const HARD_REG_SET *valid_mode_changes_for_regno (unsigned int);
/* In reload1.cc */
-extern int function_invariant_p (const_rtx);
+extern bool function_invariant_p (const_rtx);
/* In calls.cc */
enum libcall_type
reply other threads:[~2023-06-06 17:23 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=CAFULd4YRwe_anb9ozkoKh0nWXKC86w-O76u9G+ruSuvjEPUU+g@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).