From: Trevor Saunders <tbsaunde+...@tbsaunde.org>

gcc/ChangeLog:

2016-09-06  Trevor Saunders  <tbsaunde+...@tbsaunde.org>

        * bb-reorder.c (fix_crossing_unconditional_branches): Make type
        of jump_insn rtx_jump_insn *.
        * reorg.c (steal_delay_list_from_target): Make type of insn
        rtx_jump_insn *.
        (follow_jumps): Make type of jump rtx_jump_insn *.
---
 gcc/bb-reorder.c |  5 ++---
 gcc/reorg.c      | 12 ++++++------
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index bb8435f..b26c041 100644
--- a/gcc/bb-reorder.c
+++ b/gcc/bb-reorder.c
@@ -2146,7 +2146,7 @@ fix_crossing_unconditional_branches (void)
   rtx label;
   rtx label_addr;
   rtx_insn *indirect_jump_sequence;
-  rtx_insn *jump_insn = NULL;
+  rtx_jump_insn *jump_insn = NULL;
   rtx new_reg;
   rtx_insn *cur_insn;
   edge succ;
@@ -2201,8 +2201,7 @@ fix_crossing_unconditional_branches (void)
                {
                  if (!BARRIER_P (cur_insn))
                    BLOCK_FOR_INSN (cur_insn) = cur_bb;
-                 if (JUMP_P (cur_insn))
-                   jump_insn = cur_insn;
+                 jump_insn = dyn_cast<rtx_jump_insn *> (cur_insn);
                }
 
              /* Insert the new (indirect) jump sequence immediately before
diff --git a/gcc/reorg.c b/gcc/reorg.c
index c58d608..d798c6a 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -205,7 +205,7 @@ static int redirect_with_delay_slots_safe_p (rtx_insn *, 
rtx, rtx);
 static int redirect_with_delay_list_safe_p (rtx_insn *, rtx,
                                            const vec<rtx_insn *> &);
 static int check_annul_list_true_false (int, const vec<rtx_insn *> &);
-static void steal_delay_list_from_target (rtx_insn *, rtx, rtx_sequence *,
+static void steal_delay_list_from_target (rtx_jump_insn *, rtx, rtx_sequence *,
                                          vec<rtx_insn *> *,
                                          struct resources *,
                                          struct resources *,
@@ -1033,10 +1033,10 @@ check_annul_list_true_false (int annul_true_p,
    execution should continue.  */
 
 static void
-steal_delay_list_from_target (rtx_insn *insn, rtx condition, rtx_sequence *seq,
-                             vec<rtx_insn *> *delay_list, resources *sets,
-                             struct resources *needed,
-                             struct resources *other_needed,
+steal_delay_list_from_target (rtx_jump_insn *insn, rtx condition,
+                             rtx_sequence *seq, vec<rtx_insn *> *delay_list,
+                             resources *sets, resources *needed,
+                             resources *other_needed,
                              int slots_to_fill, int *pslots_filled,
                              int *pannul_p, rtx *pnew_thread)
 {
@@ -2265,7 +2265,7 @@ fill_simple_delay_slots (int non_jumps_p)
    set *CROSSING to true, otherwise set it to false.  */
 
 static rtx
-follow_jumps (rtx label, rtx_insn *jump, bool *crossing)
+follow_jumps (rtx label, rtx_jump_insn *jump, bool *crossing)
 {
   rtx_insn *insn;
   rtx_insn *next;
-- 
2.9.3

Reply via email to