]> gcc.gnu.org Git - gcc.git/commitdiff
use rtx_insn * in various places where it is obvious
authorTrevor Saunders <tbsaunde+gcc@tbsaunde.org>
Wed, 2 Nov 2016 03:44:50 +0000 (03:44 +0000)
committerTrevor Saunders <tbsaunde@gcc.gnu.org>
Wed, 2 Nov 2016 03:44:50 +0000 (03:44 +0000)
gcc/ChangeLog:

2016-11-01  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

* config/arc/arc.c (arc_emit_call_tls_get_addr): Make the type
of variables rtx_insn *.
* config/arm/arm.c (arm_call_tls_get_addr): Likewise.
(legitimize_tls_address): Likewise.
* config/bfin/bfin.c (hwloop_optimize): Likewise.
(bfin_gen_bundles): Likewise.
* config/c6x/c6x.c (reorg_split_calls): Likewise.
(c6x_reorg): Likewise.
* config/frv/frv.c (frv_reorder_packet): Likewise.
* config/i386/i386.c (ix86_split_idivmod): Likewise.
* config/ia64/ia64.c (ia64_expand_compare): Likewise.
* config/m32c/m32c.c (m32c_prepare_shift): Likewise.
* config/mn10300/mn10300.c: Likewise.
* config/rl78/rl78.c: Likewise.
* config/s390/s390.c (s390_fix_long_loop_prediction): Likewise.
* config/sh/sh-mem.cc (sh_expand_cmpstr): Likewise.
(sh_expand_cmpnstr): Likewise.
(sh_expand_strlen): Likewise.
(sh_expand_setmem): Likewise.
* config/sh/sh.md: Likewise.
* emit-rtl.c (emit_pattern_before): Likewise.
* except.c: Likewise.
* final.c: Likewise.
* jump.c: Likewise.

From-SVN: r241768

19 files changed:
gcc/ChangeLog
gcc/compare-elim.c
gcc/config/arc/arc.c
gcc/config/arm/arm.c
gcc/config/bfin/bfin.c
gcc/config/c6x/c6x.c
gcc/config/frv/frv.c
gcc/config/i386/i386.c
gcc/config/ia64/ia64.c
gcc/config/m32c/m32c.c
gcc/config/mn10300/mn10300.c
gcc/config/rl78/rl78.c
gcc/config/s390/s390.c
gcc/config/sh/sh-mem.cc
gcc/config/sh/sh.md
gcc/emit-rtl.c
gcc/except.c
gcc/final.c
gcc/jump.c

index 3a7b71dea6a6362067028352117f63a342cb67d4..02d929f1185db7d51f0e7416509d202894292992 100644 (file)
@@ -1,3 +1,30 @@
+2016-11-01  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
+
+       * config/arc/arc.c (arc_emit_call_tls_get_addr): Make the type
+       of variables rtx_insn *.
+       * config/arm/arm.c (arm_call_tls_get_addr): Likewise.
+       (legitimize_tls_address): Likewise.
+       * config/bfin/bfin.c (hwloop_optimize): Likewise.
+       (bfin_gen_bundles): Likewise.
+       * config/c6x/c6x.c (reorg_split_calls): Likewise.
+       (c6x_reorg): Likewise.
+       * config/frv/frv.c (frv_reorder_packet): Likewise.
+       * config/i386/i386.c (ix86_split_idivmod): Likewise.
+       * config/ia64/ia64.c (ia64_expand_compare): Likewise.
+       * config/m32c/m32c.c (m32c_prepare_shift): Likewise.
+       * config/mn10300/mn10300.c: Likewise.
+       * config/rl78/rl78.c: Likewise.
+       * config/s390/s390.c (s390_fix_long_loop_prediction): Likewise.
+       * config/sh/sh-mem.cc (sh_expand_cmpstr): Likewise.
+       (sh_expand_cmpnstr): Likewise.
+       (sh_expand_strlen): Likewise.
+       (sh_expand_setmem): Likewise.
+       * config/sh/sh.md: Likewise.
+       * emit-rtl.c (emit_pattern_before): Likewise.
+       * except.c: Likewise.
+       * final.c: Likewise.
+       * jump.c: Likewise.
+
 2016-11-01  Jason Merrill  <jason@redhat.com>
 
        * tree-inline.c (copy_tree_body_r): Only copy the taken branch of
index 2820de9ae8dcbb6fb563fb48d141a6decd4b0d4c..c66f13152ceeb79010c8deb7d99b4aa9797e8308 100644 (file)
@@ -627,7 +627,7 @@ try_eliminate_compare (struct comparison *cmp)
   /* We've reached PREV_CLOBBER without finding a modification of IN_A.
      Validate that PREV_CLOBBER itself does in fact refer to IN_A.  Do
      recall that we've already validated the shape of PREV_CLOBBER.  */
-  rtx insn = cmp->prev_clobber;
+  rtx_insn *insn = cmp->prev_clobber;
   x = XVECEXP (PATTERN (insn), 0, 0);
   if (rtx_equal_p (SET_DEST (x), in_a))
     cmp_src = SET_SRC (x);
index 0e7b63dc6f7bd5adf0f62b737f3654e7b32a7802..b5f306cb055e1d60d8e4fd8adcf283f79cab335c 100644 (file)
@@ -4830,7 +4830,6 @@ static rtx
 arc_emit_call_tls_get_addr (rtx sym, int reloc, rtx eqv)
 {
   rtx r0 = gen_rtx_REG (Pmode, R0_REG);
-  rtx insns;
   rtx call_fusage = NULL_RTX;
 
   start_sequence ();
@@ -4847,7 +4846,7 @@ arc_emit_call_tls_get_addr (rtx sym, int reloc, rtx eqv)
   RTL_PURE_CALL_P (call_insn) = 1;
   add_function_usage_to (call_insn, call_fusage);
 
-  insns = get_insns ();
+  rtx_insn *insns = get_insns ();
   end_sequence ();
 
   rtx dest = gen_reg_rtx (Pmode);
index dd8d5e5db8ca50daab648e58df290969aa794862..5add0d6443b1e36ea04a76eaddf86aaf6d016820 100644 (file)
@@ -7905,10 +7905,10 @@ load_tls_operand (rtx x, rtx reg)
   return reg;
 }
 
-static rtx
+static rtx_insn *
 arm_call_tls_get_addr (rtx x, rtx reg, rtx *valuep, int reloc)
 {
-  rtx insns, label, labelno, sum;
+  rtx label, labelno, sum;
 
   gcc_assert (reloc != TLS_DESCSEQ);
   start_sequence ();
@@ -7932,7 +7932,7 @@ arm_call_tls_get_addr (rtx x, rtx reg, rtx *valuep, int reloc)
                                     LCT_PURE, /* LCT_CONST?  */
                                     Pmode, 1, reg, Pmode);
 
-  insns = get_insns ();
+  rtx_insn *insns = get_insns ();
   end_sequence ();
 
   return insns;
@@ -7964,7 +7964,8 @@ arm_tls_descseq_addr (rtx x, rtx reg)
 rtx
 legitimize_tls_address (rtx x, rtx reg)
 {
-  rtx dest, tp, label, labelno, sum, insns, ret, eqv, addend;
+  rtx dest, tp, label, labelno, sum, ret, eqv, addend;
+  rtx_insn *insns;
   unsigned int model = SYMBOL_REF_TLS_MODEL (x);
 
   switch (model)
index 2dfd03865d996a5fbf469db967449bb9ce701b30..5f0efd9b5442605857210dc88abfb0fe495f6642 100644 (file)
@@ -3432,7 +3432,8 @@ hwloop_optimize (hwloop_info loop)
   basic_block bb;
   rtx_insn *insn, *last_insn;
   rtx loop_init, start_label, end_label;
-  rtx iter_reg, scratchreg, scratch_init, scratch_init_insn;
+  rtx iter_reg, scratchreg, scratch_init;
+  rtx_insn *scratch_init_insn;
   rtx lc_reg, lt_reg, lb_reg;
   rtx seq_end;
   rtx_insn *seq;
@@ -3453,7 +3454,7 @@ hwloop_optimize (hwloop_info loop)
 
   scratchreg = NULL_RTX;
   scratch_init = iter_reg;
-  scratch_init_insn = NULL_RTX;
+  scratch_init_insn = NULL;
   if (!PREG_P (iter_reg) && loop->incoming_src)
     {
       basic_block bb_in = loop->incoming_src;
@@ -3977,7 +3978,7 @@ bfin_gen_bundles (void)
       for (insn = BB_HEAD (bb);; insn = next)
        {
          int at_end;
-         rtx delete_this = NULL_RTX;
+         rtx_insn *delete_this = NULL;
 
          if (NONDEBUG_INSN_P (insn))
            {
index f8c3d668dbe300d5082d449c7b93c0ed5dcb6057..6cb9185ca02417bb35c3acfc07a32ce21cdee815 100644 (file)
@@ -4856,7 +4856,7 @@ find_last_same_clock (rtx_insn *insn)
    the SEQUENCEs that represent execute packets.  */
 
 static void
-reorg_split_calls (rtx *call_labels)
+reorg_split_calls (rtx_insn **call_labels)
 {
   unsigned int reservation_mask = 0;
   rtx_insn *insn = get_insns ();
@@ -4878,7 +4878,7 @@ reorg_split_calls (rtx *call_labels)
 
       if (returning_call_p (insn))
        {
-         rtx label = gen_label_rtx ();
+         rtx_code_label *label = gen_label_rtx ();
          rtx labelref = gen_rtx_LABEL_REF (Pmode, label);
          rtx reg = gen_rtx_REG (SImode, RETURN_ADDR_REGNO);
 
@@ -5029,7 +5029,7 @@ reorg_split_calls (rtx *call_labels)
    scheduling was run earlier.  */
 
 static void
-reorg_emit_nops (rtx *call_labels)
+reorg_emit_nops (rtx_insn **call_labels)
 {
   bool first;
   rtx last_call;
@@ -5921,7 +5921,6 @@ static void
 c6x_reorg (void)
 {
   basic_block bb;
-  rtx *call_labels;
   bool do_selsched = (c6x_flag_schedule_insns2 && flag_selective_scheduling2
                      && !maybe_skip_selective_scheduling ());
 
@@ -5967,7 +5966,7 @@ c6x_reorg (void)
     }
   sched_no_dce = false;
 
-  call_labels = XCNEWVEC (rtx, get_max_uid () + 1);
+  rtx_insn **call_labels = XCNEWVEC (rtx_insn *, get_max_uid () + 1);
 
   reorg_split_calls (call_labels);
 
index 50899a7e4873d6127fc2ebc96f7f6e713d3fe3f0..fb01685fb893198072618f2a17e0f6be62a41586 100644 (file)
@@ -7594,7 +7594,7 @@ static void
 frv_reorder_packet (void)
 {
   unsigned int cursor[NUM_GROUPS];
-  rtx insns[ARRAY_SIZE (frv_unit_groups)];
+  rtx_insn *insns[ARRAY_SIZE (frv_unit_groups)];
   unsigned int unit, to, from;
   enum frv_insn_group group;
   struct frv_packet_group *packet_group;
index f70eb43c92209a2a7278022cd8244e147d01940a..5bb6efa7388a76468862684fce937435142bc4df 100644 (file)
@@ -20376,7 +20376,8 @@ ix86_split_idivmod (machine_mode mode, rtx operands[],
                    bool signed_p)
 {
   rtx_code_label *end_label, *qimode_label;
-  rtx insn, div, mod;
+  rtx div, mod;
+  rtx_insn *insn;
   rtx scratch, tmp0, tmp1, tmp2;
   rtx (*gen_divmod4_1) (rtx, rtx, rtx, rtx);
   rtx (*gen_zero_extend) (rtx, rtx);
index 31a2267a0f8d1583cbbcedd1976a4b3970255399..855715715995caa48763cd14a5c8f137d512956f 100644 (file)
@@ -1803,7 +1803,7 @@ ia64_expand_compare (rtx *expr, rtx *op0, rtx *op1)
       };
       int magic;
       enum rtx_code ncode;
-      rtx ret, insns;
+      rtx ret;
       
       gcc_assert (cmptf_libfunc && GET_MODE (*op1) == TFmode);
       switch (code)
@@ -1842,7 +1842,7 @@ ia64_expand_compare (rtx *expr, rtx *op0, rtx *op1)
       emit_insn (gen_rtx_SET (cmp, gen_rtx_fmt_ee (ncode, BImode,
                                                   ret, const0_rtx)));
 
-      insns = get_insns ();
+      rtx_insn *insns = get_insns ();
       end_sequence ();
 
       emit_libcall_block (insns, cmp, cmp,
index ccd9675d3badb59ab2de1ea41a9871b863c1c8a5..6077201a3b028e1612122de490ecce790634f303 100644 (file)
@@ -3781,13 +3781,13 @@ m32c_prepare_shift (rtx * operands, int scale, int shift_code)
         undefined to skip one of the comparisons.  */
 
       rtx count;
-      rtx label, tempvar;
+      rtx tempvar;
       rtx_insn *insn;
 
       emit_move_insn (operands[0], operands[1]);
 
       count = temp;
-      label = gen_label_rtx ();
+      rtx_code_label *label = gen_label_rtx ();
       LABEL_NUSES (label) ++;
 
       tempvar = gen_reg_rtx (mode);
index dbbc4db1410ba58a74c51c24802045c0ea7192b1..e61bf408d5ab1349a3648dfdb208cbdfc67337eb 100644 (file)
@@ -3163,7 +3163,7 @@ mn10300_bundle_liw (void)
    Insert a SETLB insn just before LABEL.  */
 
 static void
-mn10300_insert_setlb_lcc (rtx label, rtx branch)
+mn10300_insert_setlb_lcc (rtx_insn *label, rtx branch)
 {
   rtx lcc, comparison, cmp_reg;
 
index 5375e18dd95d60036ab685e37787dc46569f5fe8..30ce349ff570057d34bcadaaf50b8f81d6a794fe 100644 (file)
@@ -2949,7 +2949,7 @@ move_to_acc (int opno, rtx before)
 }
 
 static void
-force_into_acc (rtx src, rtx before)
+force_into_acc (rtx src, rtx_insn *before)
 {
   machine_mode mode = GET_MODE (src);
   rtx move;
index 3554f339f3f1c3111f929bd721c7d419d06bfc7e..3f98cd820d51e47c2a6651d86bcf6f0a751dcb62 100644 (file)
@@ -4840,7 +4840,8 @@ s390_emit_tls_call_insn (rtx result_reg, rtx tls_call)
 static rtx
 legitimize_tls_address (rtx addr, rtx reg)
 {
-  rtx new_rtx, tls_call, temp, base, r2, insn;
+  rtx new_rtx, tls_call, temp, base, r2;
+  rtx_insn *insn;
 
   if (GET_CODE (addr) == SYMBOL_REF)
     switch (tls_symbolic_operand (addr))
@@ -13280,7 +13281,7 @@ static bool
 s390_fix_long_loop_prediction (rtx_insn *insn)
 {
   rtx set = single_set (insn);
-  rtx code_label, label_ref, new_label;
+  rtx code_label, label_ref;
   rtx_insn *uncond_jump;
   rtx_insn *cur_insn;
   rtx tmp;
@@ -13317,7 +13318,7 @@ s390_fix_long_loop_prediction (rtx_insn *insn)
     if (!cur_insn || JUMP_P (cur_insn) || LABEL_P (cur_insn))
       return false;
 
-  new_label = gen_label_rtx ();
+  rtx_code_label *new_label = gen_label_rtx ();
   uncond_jump = emit_jump_insn_after (
                  gen_rtx_SET (pc_rtx,
                               gen_rtx_LABEL_REF (VOIDmode, code_label)),
index 1773f1df4d38f9a88d0e5c2a79b025844e092a0a..b965aed1684a810735e87cc4f08895eafc4c8a79 100644 (file)
@@ -204,7 +204,7 @@ sh_expand_cmpstr (rtx *operands)
   rtx tmp2 = gen_reg_rtx (SImode);
   rtx tmp3 = gen_reg_rtx (SImode);
 
-  rtx jump;
+  rtx_insn *jump;
   rtx_code_label *L_return = gen_label_rtx ();
   rtx_code_label *L_loop_byte = gen_label_rtx ();
   rtx_code_label *L_end_loop_byte = gen_label_rtx ();
@@ -342,7 +342,7 @@ sh_expand_cmpnstr (rtx *operands)
   rtx tmp1 = gen_reg_rtx (SImode);
   rtx tmp2 = gen_reg_rtx (SImode);
 
-  rtx jump;
+  rtx_insn *jump;
   rtx_code_label *L_return = gen_label_rtx ();
   rtx_code_label *L_loop_byte = gen_label_rtx ();
   rtx_code_label *L_end_loop_byte = gen_label_rtx ();
@@ -583,7 +583,7 @@ sh_expand_strlen (rtx *operands)
   rtx_code_label *L_return = gen_label_rtx ();
   rtx_code_label *L_loop_byte = gen_label_rtx ();
 
-  rtx jump;
+  rtx_insn *jump;
   rtx_code_label *L_loop_long = gen_label_rtx ();
   rtx_code_label *L_end_loop_long = gen_label_rtx ();
 
@@ -669,7 +669,7 @@ sh_expand_setmem (rtx *operands)
   rtx_code_label *L_loop_byte = gen_label_rtx ();
   rtx_code_label *L_loop_word = gen_label_rtx ();
   rtx_code_label *L_return = gen_label_rtx ();
-  rtx jump;
+  rtx_insn *jump;
   rtx dest = copy_rtx (operands[0]);
   rtx dest_addr = copy_addr_to_reg (XEXP (dest, 0));
   rtx val = force_reg (SImode, operands[2]);
index e80ef581b2d0c2a434f3ab39d2f17ae538ad97d7..c6956a056b4324f19bd80724fdbbda981cd66251 100644 (file)
   "&& 1"
   [(const_int 0)]
 {
-  rtx prev_set_t_insn = NULL_RTX;
+  rtx_insn *prev_set_t_insn = NULL;
 
   if (!arith_reg_operand (operands[3], SImode))
     {
                 && ! reg_referenced_p (get_t_reg_rtx (),
                                        PATTERN (prev_set_t_insn))))
            {
-             prev_set_t_insn = NULL_RTX;
+             prev_set_t_insn = NULL;
              tmp_t_reg = gen_reg_rtx (SImode);
              emit_insn (gen_move_insn (tmp_t_reg, get_t_reg_rtx ()));
            } 
   if (INTVAL (operands[2]) > 1)
     {
       const rtx shift_count = GEN_INT (INTVAL (operands[2]) - 1);
-      rtx prev_set_t_insn = NULL_RTX;
+      rtx_insn *prev_set_t_insn = NULL;
       rtx tmp_t_reg = NULL_RTX;
 
       /* If we're going to emit a shift sequence that clobbers the T_REG,
                 && ! reg_referenced_p (get_t_reg_rtx (),
                                        PATTERN (prev_set_t_insn))))
            {
-             prev_set_t_insn = NULL_RTX;
+             prev_set_t_insn = NULL;
              tmp_t_reg = gen_reg_rtx (SImode);
              emit_insn (gen_move_insn (tmp_t_reg, get_t_reg_rtx ()));
            } 
   "TARGET_SH1 && ! TARGET_ZDCBRANCH"
   [(const_int 0)]
 {
-  rtx skip_neg_label = gen_label_rtx ();
+  rtx_code_label *skip_neg_label = gen_label_rtx ();
 
   emit_move_insn (operands[0], operands[1]);
 
   "&& can_create_pseudo_p ()"
   [(const_int 0)]
 {
-  rtx skip_neg_label = gen_label_rtx ();
+  rtx_code_label *skip_neg_label = gen_label_rtx ();
 
   emit_move_insn (operands[0], operands[1]);
 
   [(match_operand 0 "" "") (match_operand 1 "" "")]
   ""
 {
-  rtx gotoffsym, insn;
+  rtx gotoffsym;
   rtx t = (!can_create_pseudo_p ()
           ? operands[0]
           : gen_reg_rtx (GET_MODE (operands[0])));
   gotoffsym = gen_sym2GOTOFF (operands[1]);
   PUT_MODE (gotoffsym, Pmode);
   emit_move_insn (t, gotoffsym);
-  insn = emit_move_insn (operands[0], gen_rtx_PLUS (Pmode, t, picreg));
+  rtx_insn *insn = emit_move_insn (operands[0], gen_rtx_PLUS (Pmode, t, picreg));
 
   set_unique_reg_note (insn, REG_EQUAL, operands[1]);
 
   "&& 1"
   [(const_int 0)]
 {
-  rtx skip_label = gen_label_rtx ();
+  rtx_code_label *skip_label = gen_label_rtx ();
   emit_move_insn (operands[0], operands[1]);
 
   rtx cmp_val = operands[2];
index 8afcfbec98a6a87fad7bff66c643ec7956c08879..a8516ebe84b04746b7e8e3e7e9b6ee88e56d7ab3 100644 (file)
@@ -4813,7 +4813,7 @@ emit_pattern_before (rtx pattern, rtx uncast_before, bool skip_debug_insns,
                                       insnp, make_raw);
   else
     return emit_pattern_before_noloc (pattern, before,
-                                      insnp ? before : NULL_RTX,
+                                     insnp ? before : NULL_RTX,
                                       NULL, make_raw);
 }
 
index f0a1be0099f84fb494e025b67e295c74c84978e0..e811b56074d69e31a81c67d1c3a2f304af98a16d 100644 (file)
@@ -909,7 +909,7 @@ assign_filter_values (void)
    first instruction of some existing BB and return the newly
    produced block.  */
 static basic_block
-emit_to_new_bb_before (rtx_insn *seq, rtx insn)
+emit_to_new_bb_before (rtx_insn *seq, rtx_insn *insn)
 {
   rtx_insn *last;
   basic_block bb;
index 71dba7c04223a7dcf01e2a070958abff950db5a8..5709d0e2406bb9aa025ffe9aa6ece2cd0da7176f 100644 (file)
@@ -214,7 +214,7 @@ static void leaf_renumber_regs (rtx_insn *);
 static int alter_cond (rtx);
 #endif
 #ifndef ADDR_VEC_ALIGN
-static int final_addr_vec_align (rtx);
+static int final_addr_vec_align (rtx_insn *);
 #endif
 static int align_fuzz (rtx, rtx, int, unsigned);
 static void collect_fn_hard_reg_usage (void);
@@ -513,7 +513,7 @@ default_jump_align_max_skip (rtx_insn *insn ATTRIBUTE_UNUSED)
 
 #ifndef ADDR_VEC_ALIGN
 static int
-final_addr_vec_align (rtx addr_vec)
+final_addr_vec_align (rtx_insn *addr_vec)
 {
   int align = GET_MODE_SIZE (GET_MODE (PATTERN (addr_vec)));
 
index fafef05f5b276330029666a0ba950de09c63807b..b6828133cb3829c8ea9e0d6f6db1ce2141e3d866 100644 (file)
@@ -62,7 +62,7 @@ static void init_label_info (rtx_insn *);
 static void mark_all_labels (rtx_insn *);
 static void mark_jump_label_1 (rtx, rtx_insn *, bool, bool);
 static void mark_jump_label_asm (rtx, rtx_insn *);
-static void redirect_exp_1 (rtx *, rtx, rtx, rtx);
+static void redirect_exp_1 (rtx *, rtx, rtx, rtx_insn *);
 static int invert_exp_1 (rtx, rtx_insn *);
 \f
 /* Worker for rebuild_jump_labels and rebuild_jump_labels_chain.  */
@@ -1457,7 +1457,7 @@ redirect_target (rtx x)
    NLABEL as a return.  Accrue modifications into the change group.  */
 
 static void
-redirect_exp_1 (rtx *loc, rtx olabel, rtx nlabel, rtx insn)
+redirect_exp_1 (rtx *loc, rtx olabel, rtx nlabel, rtx_insn *insn)
 {
   rtx x = *loc;
   RTX_CODE code = GET_CODE (x);
This page took 0.239703 seconds and 5 git commands to generate.