split up the trial variable in reorg.c:relax_delay_slots to use rtx_insn * more

gcc/ChangeLog:

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

	* reorg.c (relax_delay_slots): Split up the trial variable.

From-SVN: r241769
This commit is contained in:
Trevor Saunders 2016-11-02 03:45:29 +00:00 committed by Trevor Saunders
parent 9b2ea071ab
commit 88f9bb4dcb
2 changed files with 13 additions and 10 deletions

View File

@ -1,3 +1,7 @@
2016-11-01 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* reorg.c (relax_delay_slots): Split up the trial variable.
2016-11-01 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* config/arc/arc.c (arc_emit_call_tls_get_addr): Make the type

View File

@ -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<rtx_insn *> &);
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);