From: Trevor Saunders <[email protected]>

gcc/ChangeLog:

        * expr.h (try_casesi, try_tablejump): Take rtx_code_label * for
        the labels.  The fallback label of try_casesi is an rtx_insn *.
        * expr.cc (try_casesi, do_tablejump, try_tablejump): Likewise.
        * explow.h (emit_stack_clash_protection_probe_loop_end): Take an
        rtx_code_label * for the end label.
        * explow.cc (emit_stack_clash_protection_probe_loop_end): Likewise.
        * function.cc (record_insns): Take an rtx_insn * for the end.
        * varasm.cc (mark_constants_in_pattern): Take an rtx_insn *.
        * emit-rtl.cc (reset_insn_used_flags, verify_insn_sharing,
        verify_rtx_sharing): Take an rtx_insn * for the insn.
        * config/s390/s390.cc (s390_emit_ccraw_jump): Take an
        rtx_code_label *.
        * config/arc/arc.cc (conditionalize_nonjump): Take an rtx_insn *.
        * config/mips/mips.cc (vr4130_true_reg_dependence_p): Likewise.
        (vr4130_true_reg_dependence_p_1): Read that argument as an
        rtx_insn *.

Signed-off-by: Trevor Saunders <[email protected]>
---
 gcc/config/arc/arc.cc   |  2 +-
 gcc/config/mips/mips.cc |  6 ++----
 gcc/config/s390/s390.cc |  3 ++-
 gcc/emit-rtl.cc         |  6 +++---
 gcc/explow.cc           |  4 ++--
 gcc/explow.h            |  5 +++--
 gcc/expr.cc             | 15 ++++++++-------
 gcc/expr.h              |  8 ++++----
 gcc/function.cc         |  6 ++++--
 gcc/varasm.cc           |  2 +-
 10 files changed, 30 insertions(+), 27 deletions(-)

diff --git a/gcc/config/arc/arc.cc b/gcc/config/arc/arc.cc
index a27e6aaafc5..f041b6043f9 100644
--- a/gcc/config/arc/arc.cc
+++ b/gcc/config/arc/arc.cc
@@ -9479,7 +9479,7 @@ arc_adjust_insn_length (rtx_insn *insn, int len, bool)
    ANNULLED indicates if INSN is an annulled delay-slot insn.
    Register further changes if necessary.  */
 static rtx
-conditionalize_nonjump (rtx pat, rtx cond, rtx insn, bool annulled)
+conditionalize_nonjump (rtx pat, rtx cond, rtx_insn *insn, bool annulled)
 {
   /* For commutative operators, we generally prefer to have
      the first source match the destination.  */
diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc
index bca2f13c71d..4402ae17c0d 100644
--- a/gcc/config/mips/mips.cc
+++ b/gcc/config/mips/mips.cc
@@ -15403,9 +15403,7 @@ static void
 vr4130_true_reg_dependence_p_1 (rtx x, const_rtx pat ATTRIBUTE_UNUSED,
                                void *data)
 {
-  rtx *insn_ptr;
-
-  insn_ptr = (rtx *) data;
+  auto insn_ptr = (rtx_insn **) data;
   if (REG_P (x)
       && *insn_ptr != 0
       && reg_referenced_p (x, PATTERN (*insn_ptr)))
@@ -15416,7 +15414,7 @@ vr4130_true_reg_dependence_p_1 (rtx x, const_rtx pat 
ATTRIBUTE_UNUSED,
    and INSN.  */
 
 static bool
-vr4130_true_reg_dependence_p (rtx insn)
+vr4130_true_reg_dependence_p (rtx_insn *insn)
 {
   note_stores (vr4130_last_insn, vr4130_true_reg_dependence_p_1, &insn);
   return insn == 0;
diff --git a/gcc/config/s390/s390.cc b/gcc/config/s390/s390.cc
index 5b615aaef00..9902daec371 100644
--- a/gcc/config/s390/s390.cc
+++ b/gcc/config/s390/s390.cc
@@ -6640,7 +6640,8 @@ s390_expand_cmpmem (rtx target, rtx op0, rtx op1, rtx len)
    comparison operator COMPARISON.  Return the emitted jump insn.  */
 
 static rtx_insn *
-s390_emit_ccraw_jump (HOST_WIDE_INT mask, enum rtx_code comparison, rtx label)
+s390_emit_ccraw_jump (HOST_WIDE_INT mask, enum rtx_code comparison,
+                     rtx_code_label *label)
 {
   rtx temp;
 
diff --git a/gcc/emit-rtl.cc b/gcc/emit-rtl.cc
index 46cc60e66c9..03ac60a3468 100644
--- a/gcc/emit-rtl.cc
+++ b/gcc/emit-rtl.cc
@@ -3031,7 +3031,7 @@ unshare_all_rtl (void)
    Recursively does the same for subexpressions.  */
 
 static void
-verify_rtx_sharing (rtx orig, rtx insn)
+verify_rtx_sharing (rtx orig, rtx_insn *insn)
 {
   rtx x = orig;
   int i;
@@ -3139,7 +3139,7 @@ verify_rtx_sharing (rtx orig, rtx insn)
 /* Reset used-flags for INSN.  */
 
 static void
-reset_insn_used_flags (rtx insn)
+reset_insn_used_flags (rtx_insn *insn)
 {
   gcc_assert (INSN_P (insn));
   reset_used_flags (PATTERN (insn));
@@ -3177,7 +3177,7 @@ reset_all_used_flags (void)
 /* Verify sharing in INSN.  */
 
 static void
-verify_insn_sharing (rtx insn)
+verify_insn_sharing (rtx_insn *insn)
 {
   gcc_assert (INSN_P (insn));
   verify_rtx_sharing (PATTERN (insn), insn);
diff --git a/gcc/explow.cc b/gcc/explow.cc
index 54348d582e1..05a7b5188b8 100644
--- a/gcc/explow.cc
+++ b/gcc/explow.cc
@@ -2043,8 +2043,8 @@ emit_stack_clash_protection_probe_loop_start 
(rtx_code_label **loop_lab,
 
 void
 emit_stack_clash_protection_probe_loop_end (rtx_code_label *loop_lab,
-                                           rtx end_loop, rtx last_addr,
-                                           bool rotated)
+                                           rtx_code_label *end_loop,
+                                           rtx last_addr, bool rotated)
 {
   if (rotated)
     emit_cmp_and_jump_insns (stack_pointer_rtx, last_addr, NE, NULL_RTX,
diff --git a/gcc/explow.h b/gcc/explow.h
index 0795b597631..de34b6c832d 100644
--- a/gcc/explow.h
+++ b/gcc/explow.h
@@ -85,8 +85,9 @@ extern void
 emit_stack_clash_protection_probe_loop_start (rtx_code_label **,
                                              rtx_code_label **,
                                              rtx, bool);
-extern void emit_stack_clash_protection_probe_loop_end (rtx_code_label *, rtx,
-                                                       rtx, bool);
+extern void
+emit_stack_clash_protection_probe_loop_end (rtx_code_label *,
+                                           rtx_code_label *, rtx, bool);
 
 /* This enum is used for the following two functions.  */
 enum save_level {SAVE_BLOCK, SAVE_FUNCTION, SAVE_NONLOCAL};
diff --git a/gcc/expr.cc b/gcc/expr.cc
index c654387ab01..8c60cb8b7fa 100644
--- a/gcc/expr.cc
+++ b/gcc/expr.cc
@@ -105,8 +105,8 @@ static rtx do_store_flag (const_sepops, rtx, machine_mode);
 #ifdef PUSH_ROUNDING
 static void emit_single_push_insn (machine_mode, rtx, tree);
 #endif
-static void do_tablejump (rtx, machine_mode, rtx, rtx, rtx,
-                         profile_probability);
+static void do_tablejump (rtx, machine_mode, rtx, rtx_code_label *,
+                         rtx_code_label *, profile_probability);
 static rtx const_vector_from_tree (tree);
 static tree tree_expr_size (const_tree);
 static void convert_mode_scalar (rtx, rtx, int);
@@ -14226,8 +14226,8 @@ do_store_flag (const_sepops ops, rtx target, 
machine_mode mode)
    label.  */
 bool
 try_casesi (tree index_type, tree index_expr, tree minval, tree range,
-           rtx table_label, rtx default_label, rtx fallback_label,
-            profile_probability default_probability)
+           rtx_code_label *table_label, rtx_code_label *default_label,
+           rtx_insn *fallback_label, profile_probability default_probability)
 {
   class expand_operand ops[5];
   scalar_int_mode index_mode = SImode;
@@ -14296,8 +14296,9 @@ try_casesi (tree index_type, tree index_expr, tree 
minval, tree range,
    the default label.  */
 
 static void
-do_tablejump (rtx index, machine_mode mode, rtx range, rtx table_label,
-             rtx default_label, profile_probability default_probability)
+do_tablejump (rtx index, machine_mode mode, rtx range,
+             rtx_code_label *table_label, rtx_code_label *default_label,
+             profile_probability default_probability)
 {
   rtx temp, vector;
 
@@ -14375,7 +14376,7 @@ do_tablejump (rtx index, machine_mode mode, rtx range, 
rtx table_label,
 
 bool
 try_tablejump (tree index_type, tree index_expr, tree minval, tree range,
-              rtx table_label, rtx default_label,
+              rtx_code_label *table_label, rtx_code_label *default_label,
               profile_probability default_probability)
 {
   rtx index;
diff --git a/gcc/expr.h b/gcc/expr.h
index 55d72cb9510..a0194c96591 100644
--- a/gcc/expr.h
+++ b/gcc/expr.h
@@ -343,10 +343,10 @@ extern enum tree_code maybe_optimize_mod_cmp (enum 
tree_code, tree *, tree *);
 extern void maybe_optimize_sub_cmp_0 (enum tree_code, tree *, tree *);
 
 /* Two different ways of generating switch statements.  */
-extern bool try_casesi (tree, tree, tree, tree, rtx, rtx, rtx,
-                       profile_probability);
-extern bool try_tablejump (tree, tree, tree, tree, rtx, rtx,
-                          profile_probability);
+extern bool try_casesi (tree, tree, tree, tree, rtx_code_label *,
+                       rtx_code_label *, rtx_insn *, profile_probability);
+extern bool try_tablejump (tree, tree, tree, tree, rtx_code_label *,
+                          rtx_code_label *, profile_probability);
 
 extern bool safe_from_p (const_rtx, tree, int);
 
diff --git a/gcc/function.cc b/gcc/function.cc
index 0ff9f676b81..e10a0274341 100644
--- a/gcc/function.cc
+++ b/gcc/function.cc
@@ -148,7 +148,8 @@ static tree *get_block_vector (tree, int *);
 extern tree debug_find_var_in_block_tree (tree, tree);
 /* We always define `record_insns' even if it's not used so that we
    can always export `prologue_epilogue_contains'.  */
-static void record_insns (rtx_insn *, rtx, hash_table<insn_cache_hasher> **)
+static void record_insns (rtx_insn *, rtx_insn *,
+                         hash_table<insn_cache_hasher> **)
      ATTRIBUTE_UNUSED;
 static bool contains (const rtx_insn *, hash_table<insn_cache_hasher> *);
 static void prepare_function_start (void);
@@ -5811,7 +5812,8 @@ dump_stack_clash_frame_info (enum stack_clash_probes 
probes, bool residuals)
    for the first time.  */
 
 static void
-record_insns (rtx_insn *insns, rtx end, hash_table<insn_cache_hasher> **hashp)
+record_insns (rtx_insn *insns, rtx_insn *end,
+             hash_table<insn_cache_hasher> **hashp)
 {
   rtx_insn *tmp;
   hash_table<insn_cache_hasher> *hash = *hashp;
diff --git a/gcc/varasm.cc b/gcc/varasm.cc
index 14637cbe626..26ce7578da2 100644
--- a/gcc/varasm.cc
+++ b/gcc/varasm.cc
@@ -4496,7 +4496,7 @@ recompute_pool_offsets (struct rtx_constant_pool *pool)
    Emit referenced deferred strings.  */
 
 static void
-mark_constants_in_pattern (rtx insn)
+mark_constants_in_pattern (rtx_insn *insn)
 {
   subrtx_iterator::array_type array;
   FOR_EACH_SUBRTX (iter, array, PATTERN (insn), ALL)
-- 
2.53.0

Reply via email to