summaryrefslogtreecommitdiff
path: root/gcc/reorg.c
diff options
context:
space:
mode:
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>2014-09-09 15:20:07 +0000
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>2014-09-09 15:20:07 +0000
commit5e9c670f06b9eaa52db639b888e0b0d15ba864c1 (patch)
tree399a1b396970c0a0432d272941b58678b1185cf2 /gcc/reorg.c
parentf935868a274a39590a4b78f984c0bc98283d980f (diff)
downloadgcc-5e9c670f06b9eaa52db639b888e0b0d15ba864c1.tar.gz
INSN_LOCATION takes an rtx_insn
gcc/ChangeLog: 2014-09-09 David Malcolm <dmalcolm@redhat.com> * rtl.h (INSN_LOCATION): Strengthen param from const_rtx to const rtx_insn *, and from rtx to rtx_insn * for the other overloaded variant. (RTL_LOCATION): Add a checked cast to rtx_insn * when invoking INSN_LOCATION, since we know INSN_P holds. (insn_line): Strengthen param from const_rtx to const rtx_insn *. (insn_file): Likewise. (insn_scope): Likewise. (insn_location): Likewise. * config/mips/mips.c (mips16_gp_pseudo_reg): Strengthen local "insn" from rtx to rtx_insn *, introducing a new local rtx "set" for the result of gen_load_const_gp. * config/rs6000/rs6000-protos.h (output_call): Strengthen first param from rtx to rtx_insn *. * config/rs6000/rs6000.c (output_call): Likewise. * dwarf2out.c (dwarf2out_var_location): Likewise for local "prev", introducing a checked cast to rtx_sequence * and use of the insn method. * emit-rtl.c (emit_copy_of_insn_after): Strengthen both params from rtx to rtx_insn *. (insn_scope): Strengthen param from const_rtx to const rtx_insn *. (insn_line): Likewise. (insn_file): Likewise. (insn_location): Likewise. * emit-rtl.h (emit_copy_of_insn_after): Strengthen both params from rtx to rtx_insn *. * print-rtl.c (print_rtx): Introduce local "in_insn" via a checked cast, using it for calls to INSN_HAS_LOCATION and insn_location. * recog.c (peep2_attempt): Introduce local rtx_insn * "peepinsn" via a checked cast. * reorg.c (relax_delay_slots): Strengthen locals named "after" from rtx to rtx_insn *; use methods of "pat" for type-safety. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215084 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reorg.c')
-rw-r--r--gcc/reorg.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/reorg.c b/gcc/reorg.c
index 400a20fd01c..18820f01ba7 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -3297,7 +3297,7 @@ relax_delay_slots (rtx_insn *first)
&& JUMP_P (next)
&& PATTERN (next) == PATTERN (delay_insn))
{
- rtx after;
+ rtx_insn *after;
int i;
/* Delete the RETURN and just execute the delay list insns.
@@ -3321,8 +3321,8 @@ relax_delay_slots (rtx_insn *first)
gcc_assert (GET_CODE (pat) == SEQUENCE);
add_insn_after (delay_insn, trial, NULL);
after = delay_insn;
- for (i = 1; i < XVECLEN (pat, 0); i++)
- after = emit_copy_of_insn_after (XVECEXP (pat, 0, i), after);
+ for (i = 1; i < pat->len (); i++)
+ after = emit_copy_of_insn_after (pat->insn (i), after);
delete_scheduled_jump (delay_insn);
continue;
}
@@ -3424,7 +3424,7 @@ relax_delay_slots (rtx_insn *first)
#endif
)
{
- rtx after;
+ rtx_insn *after;
int i;
/* All this insn does is execute its delay list and jump to the
@@ -3450,8 +3450,8 @@ relax_delay_slots (rtx_insn *first)
gcc_assert (GET_CODE (pat) == SEQUENCE);
add_insn_after (delay_insn, trial, NULL);
after = delay_insn;
- for (i = 1; i < XVECLEN (pat, 0); i++)
- after = emit_copy_of_insn_after (XVECEXP (pat, 0, i), after);
+ for (i = 1; i < pat->len (); i++)
+ after = emit_copy_of_insn_after (pat->insn (i), after);
delete_scheduled_jump (delay_insn);
continue;
}