From 88f9bb4dcba670c721b82628e51fd263779566ae Mon Sep 17 00:00:00 2001 From: Trevor Saunders Date: Wed, 2 Nov 2016 03:45:29 +0000 Subject: [PATCH] split up the trial variable in reorg.c:relax_delay_slots to use rtx_insn * more gcc/ChangeLog: 2016-11-01 Trevor Saunders * reorg.c (relax_delay_slots): Split up the trial variable. From-SVN: r241769 --- gcc/ChangeLog | 4 ++++ gcc/reorg.c | 19 +++++++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 02d929f1185..3df3fc35e7a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2016-11-01 Trevor Saunders + + * reorg.c (relax_delay_slots): Split up the trial variable. + 2016-11-01 Trevor Saunders * config/arc/arc.c (arc_emit_call_tls_get_addr): Make the type diff --git a/gcc/reorg.c b/gcc/reorg.c index 799d27b064f..da4d7c64b7e 100644 --- a/gcc/reorg.c +++ b/gcc/reorg.c @@ -222,7 +222,7 @@ static void steal_delay_list_from_fallthrough (rtx_insn *, rtx, rtx_sequence *, static void try_merge_delay_insns (rtx_insn *, rtx_insn *); static rtx_insn *redundant_insn (rtx, rtx_insn *, const vec &); static int own_thread_p (rtx, rtx, int); -static void update_block (rtx_insn *, rtx); +static void update_block (rtx_insn *, rtx_insn *); static int reorg_redirect_jump (rtx_jump_insn *, rtx); static void update_reg_dead_notes (rtx_insn *, rtx_insn *); static void fix_reg_dead_note (rtx_insn *, rtx); @@ -1703,7 +1703,7 @@ own_thread_p (rtx thread, rtx label, int allow_fallthrough) BARRIER in relax_delay_slots. */ static void -update_block (rtx_insn *insn, rtx where) +update_block (rtx_insn *insn, rtx_insn *where) { /* Ignore if this was in a delay slot and it came from the target of a branch. */ @@ -3118,7 +3118,6 @@ relax_delay_slots (rtx_insn *first) { rtx_insn *insn, *next; rtx_sequence *pat; - rtx trial; rtx_insn *delay_insn; rtx target_label; @@ -3271,10 +3270,10 @@ relax_delay_slots (rtx_insn *first) for (i = 0; i < XVECLEN (pat, 0); i++) INSN_FROM_TARGET_P (XVECEXP (pat, 0, i)) = 0; - trial = PREV_INSN (insn); + rtx_insn *prev = PREV_INSN (insn); delete_related_insns (insn); gcc_assert (GET_CODE (pat) == SEQUENCE); - add_insn_after (delay_insn, trial, NULL); + add_insn_after (delay_insn, prev, NULL); after = delay_insn; for (i = 1; i < pat->len (); i++) after = emit_copy_of_insn_after (pat->insn (i), after); @@ -3295,9 +3294,9 @@ relax_delay_slots (rtx_insn *first) /* If this jump goes to another unconditional jump, thread it, but don't convert a jump into a RETURN here. */ - trial = skip_consecutive_labels (follow_jumps (target_label, - delay_jump_insn, - &crossing)); + rtx trial = skip_consecutive_labels (follow_jumps (target_label, + delay_jump_insn, + &crossing)); if (ANY_RETURN_P (trial)) trial = find_end_label (trial); @@ -3401,10 +3400,10 @@ relax_delay_slots (rtx_insn *first) for (i = 0; i < XVECLEN (pat, 0); i++) INSN_FROM_TARGET_P (XVECEXP (pat, 0, i)) = 0; - trial = PREV_INSN (insn); + rtx_insn *prev = PREV_INSN (insn); delete_related_insns (insn); gcc_assert (GET_CODE (pat) == SEQUENCE); - add_insn_after (delay_jump_insn, trial, NULL); + add_insn_after (delay_jump_insn, prev, NULL); after = delay_jump_insn; for (i = 1; i < pat->len (); i++) after = emit_copy_of_insn_after (pat->insn (i), after); -- 2.30.2