Re: [PATCH 2/8] use rtx_insn * more

2016-09-16 Thread Alexander Monakov
On Wed, 14 Sep 2016, tbsaunde+...@tbsaunde.org wrote:
> @@ -3790,7 +3790,8 @@ static void
>  rl78_calculate_death_notes (void)
>  {
>char dead[FIRST_PSEUDO_REGISTER];
> -  rtx insn, p, s, d;
> +  rtx p, s, d;
> +rtx_insn *insn;

Minor nit: this hunk seems to be missing indentation preceding 'rtx_insn'.

Alexander


[PATCH 2/8] use rtx_insn * more

2016-09-14 Thread tbsaunde+gcc
From: Trevor Saunders 

gcc/ChangeLog:

2016-09-06  Trevor Saunders  

* config/arc/arc-protos.h (arc_label_align): Change type of
variables from rtx to rtx_insn *.
* config/arc/arc.c (arc_label_align): Likewise.
* config/arm/arm.c (any_sibcall_could_use_r3): Likewise.
* config/bfin/bfin.c (workaround_speculation): Likewise.
* config/c6x/c6x.c (find_next_cycle_insn): Likewise.
(find_last_same_clock): Likewise.
(reorg_split_calls): Likewise.
* config/cris/cris-protos.h (cris_cc0_user_requires_cmp): Likewise.
* config/cris/cris.c (cris_cc0_user_requires_cmp): Likewise.
* config/h8300/h8300-protos.h (same_cmp_preceding_p): Likewise.
(same_cmp_following_p): Likewise.
* config/h8300/h8300.c (same_cmp_preceding_p): Likewise.
(same_cmp_following_p): Likwise.
* config/m32r/m32r.c (m32r_expand_epilogue): Likewise.
* config/nds32/nds32-protos.h (nds32_target_alignment): Likewise.
* config/nds32/nds32.c (nds32_target_alignment): Likewise.
* config/rl78/rl78.c (rl78_alloc_physical_registers_op2):
* Likewise.
(rl78_alloc_physical_registers_cmp): Likewise.
(rl78_alloc_physical_registers_umul): Likewise.
(rl78_calculate_death_notes): Likewise.
* config/s390/s390-protos.h (s390_label_align): Likewise.
* config/s390/s390.c (s390_label_align): Likewise.
* config/sh/sh.c (barrier_align): Likewise.
* config/sparc/sparc-protos.h (emit_cbcond_nop): Likewise.
* config/sparc/sparc.c (sparc_asm_function_epilogue): Likewise.
(emit_cbcond_nop): Likewise.
---
 gcc/config/arc/arc-protos.h |  2 +-
 gcc/config/arc/arc.c|  2 +-
 gcc/config/arm/arm.c|  2 +-
 gcc/config/bfin/bfin.c  |  2 +-
 gcc/config/c6x/c6x.c| 19 +--
 gcc/config/cris/cris-protos.h   |  2 +-
 gcc/config/cris/cris.c  |  2 +-
 gcc/config/h8300/h8300-protos.h |  4 ++--
 gcc/config/h8300/h8300.c|  4 ++--
 gcc/config/m32r/m32r.c  |  2 +-
 gcc/config/nds32/nds32-protos.h |  2 +-
 gcc/config/nds32/nds32.c|  2 +-
 gcc/config/rl78/rl78.c  | 11 ++-
 gcc/config/s390/s390-protos.h   |  2 +-
 gcc/config/s390/s390.c  |  2 +-
 gcc/config/sh/sh.c  |  2 +-
 gcc/config/sparc/sparc-protos.h |  2 +-
 gcc/config/sparc/sparc.c|  8 +++-
 18 files changed, 35 insertions(+), 37 deletions(-)

diff --git a/gcc/config/arc/arc-protos.h b/gcc/config/arc/arc-protos.h
index 8630e2d..73aacbc 100644
--- a/gcc/config/arc/arc-protos.h
+++ b/gcc/config/arc/arc-protos.h
@@ -109,7 +109,7 @@ extern rtx arc_regno_use_in (unsigned int, rtx);
 extern int arc_attr_type (rtx_insn *);
 extern bool arc_scheduling_not_expected (void);
 extern bool arc_sets_cc_p (rtx_insn *insn);
-extern int arc_label_align (rtx label);
+extern int arc_label_align (rtx_insn *label);
 extern bool arc_need_delay (rtx_insn *insn);
 extern bool arc_text_label (rtx_insn *insn);
 
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index c0aa075..2b25b0b 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -9243,7 +9243,7 @@ arc_scheduling_not_expected (void)
long.)  */
 
 int
-arc_label_align (rtx label)
+arc_label_align (rtx_insn *label)
 {
   int loop_align = LOOP_ALIGN (LABEL);
 
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 43a832e..63d0067 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -20860,7 +20860,7 @@ any_sibcall_could_use_r3 (void)
   FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR_FOR_FN (cfun)->preds)
 if (e->flags & EDGE_SIBCALL)
   {
-   rtx call = BB_END (e->src);
+   rtx_insn *call = BB_END (e->src);
if (!CALL_P (call))
  call = prev_nonnote_nondebug_insn (call);
gcc_assert (CALL_P (call) && SIBLING_CALL_P (call));
diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index 086d548..4683a28 100644
--- a/gcc/config/bfin/bfin.c
+++ b/gcc/config/bfin/bfin.c
@@ -4452,7 +4452,7 @@ workaround_speculation (void)
  || cbranch_predicted_taken_p (insn)))
{
  rtx_insn *target = JUMP_LABEL_AS_INSN (insn);
- rtx label = target;
+ rtx_insn *label = target;
  rtx_insn *next_tgt;
 
  cycles_since_jump = 0;
diff --git a/gcc/config/c6x/c6x.c b/gcc/config/c6x/c6x.c
index d759482..c250f8a 100644
--- a/gcc/config/c6x/c6x.c
+++ b/gcc/config/c6x/c6x.c
@@ -4807,10 +4807,10 @@ convert_to_callp (rtx_insn *insn)
 /* Scan forwards from INSN until we find the next insn that has mode TImode
(indicating it starts a new cycle), and occurs in cycle CLOCK.
Return it if we find such an insn, NULL_RTX otherwise.  */
-static rtx
-find_next_cycle_insn (rtx insn, int clock)
+static rtx_insn *
+find_next_cycle_insn (rtx_insn *insn, int clock)
 {
-  rtx t = insn;
+  rtx_insn *t = insn;
   if