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

https://gcc.gnu.org/g:c5e9927b95debc692374a2aede21856eb94217ae

commit r14-2588-gc5e9927b95debc692374a2aede21856eb94217ae
Author: Uros Bizjak <ubizjak@gmail.com>
Date:   Mon Jul 17 22:32:57 2023 +0200

    combine-stack-adj: Change return type of predicate function from int to bool
    
    gcc/ChangeLog:
    
            * combine-stack-adj.cc (stack_memref_p): Change return type from
            int to bool and adjust function body accordingly.
            (rest_of_handle_stack_adjustments): Change return type to void.

Diff:
---
 gcc/combine-stack-adj.cc | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/gcc/combine-stack-adj.cc b/gcc/combine-stack-adj.cc
index e479aea71a1..4171e7932e3 100644
--- a/gcc/combine-stack-adj.cc
+++ b/gcc/combine-stack-adj.cc
@@ -65,7 +65,7 @@ struct csa_reflist
   struct csa_reflist *next;
 };
 
-static int stack_memref_p (rtx);
+static bool stack_memref_p (rtx);
 static rtx single_set_for_csa (rtx_insn *);
 static void free_csa_reflist (struct csa_reflist *);
 static struct csa_reflist *record_one_stack_ref (rtx_insn *, rtx *,
@@ -92,21 +92,21 @@ combine_stack_adjustments (void)
 
 /* Recognize a MEM of the form (sp) or (plus sp const).  */
 
-static int
+static bool
 stack_memref_p (rtx x)
 {
   if (!MEM_P (x))
-    return 0;
+    return false;
   x = XEXP (x, 0);
 
   if (x == stack_pointer_rtx)
-    return 1;
+    return true;
   if (GET_CODE (x) == PLUS
       && XEXP (x, 0) == stack_pointer_rtx
       && CONST_INT_P (XEXP (x, 1)))
-    return 1;
+    return true;
 
-  return 0;
+  return false;
 }
 
 /* Recognize either normal single_set or the hack in i386.md for
@@ -791,13 +791,12 @@ combine_stack_adjustments_for_block (basic_block bb, bitmap live)
     BITMAP_FREE (copy);
 }
 \f
-static unsigned int
+static void
 rest_of_handle_stack_adjustments (void)
 {
   df_note_add_problem ();
   df_analyze ();
   combine_stack_adjustments ();
-  return 0;
 }
 
 namespace {
@@ -826,7 +825,8 @@ public:
   bool gate (function *) final override;
   unsigned int execute (function *) final override
     {
-      return rest_of_handle_stack_adjustments ();
+      rest_of_handle_stack_adjustments ();
+      return 0;
     }
 
 }; // class pass_stack_adjustments

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

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

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-17 20:33 [gcc r14-2588] combine-stack-adj: 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).