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

https://gcc.gnu.org/g:585c660f041c57694a61b3e65085af5a54431be4

commit r14-1585-g585c660f041c57694a61b3e65085af5a54431be4
Author: Uros Bizjak <ubizjak@gmail.com>
Date:   Tue Jun 6 19:11:29 2023 +0200

    reload1: Change return type of predicate function from int to bool
    
    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.

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

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

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

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

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-06 17:17 [gcc r14-1585] reload1: Change return type of predicate function 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).