]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
reload1: Change return type of predicate function from int to bool
authorUros Bizjak <ubizjak@gmail.com>
Tue, 6 Jun 2023 17:11:29 +0000 (19:11 +0200)
committerUros Bizjak <ubizjak@gmail.com>
Tue, 6 Jun 2023 17:16:54 +0000 (19:16 +0200)
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.

gcc/reload1.cc
gcc/rtl.h

index 9ec2cb9baf4b0f080a3aba19bc24a73f5d3290b4..9ba822d1ff7cf3fc339a2870e646c486cd0a2198 100644 (file)
@@ -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))
index 4c993e8270839ef2778c292c053b80b77ea71a43..988691f5710107dd2cbe0354c9cbe1f214550f49 100644 (file)
--- 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