Commit cad003ba by David Malcolm Committed by David Malcolm

config/alpha/alpha.c: Use rtx_insn

gcc/
	* config/alpha/alpha.c (alpha_emit_set_const): Strengthen local
	"insn" from rtx to rtx_insn *.
	(alpha_gp_save_rtx): Likewise for local "seq".
	(alpha_instantiate_decls): Likewise for local "top".
	(get_some_local_dynamic_name): Likewise for local "insn".
	(alpha_does_function_need_gp): Likewise.
	(set_frame_related_p): Likewise for return type and for locals
	"seq" and "insn".
	(emit_frame_store_1): Likewise for local "insn".
	(alpha_expand_prologue): Likewise for locals "insn", "seq".
	(alpha_end_function): Likewise for local "insn".
	(alpha_output_mi_thunk_osf): Likewise.
	(alphaev4_insn_pipe): Likewise for param "insn".
	(alphaev5_insn_pipe): Likewise.
	(alphaev4_next_group): Likewise for return type and param 1
	"insn".
	(alphaev5_next_group): Likewise.
	(alpha_align_insns_1): Likewise for return type and param 1 of
	callback param "next_group", and for locals "i", "next", "prev",
	"where", "where2", "insn".

From-SVN: r214435
parent adcde84f
2014-08-25 David Malcolm <dmalcolm@redhat.com>
* config/alpha/alpha.c (alpha_emit_set_const): Strengthen local
"insn" from rtx to rtx_insn *.
(alpha_gp_save_rtx): Likewise for local "seq".
(alpha_instantiate_decls): Likewise for local "top".
(get_some_local_dynamic_name): Likewise for local "insn".
(alpha_does_function_need_gp): Likewise.
(set_frame_related_p): Likewise for return type and for locals
"seq" and "insn".
(emit_frame_store_1): Likewise for local "insn".
(alpha_expand_prologue): Likewise for locals "insn", "seq".
(alpha_end_function): Likewise for local "insn".
(alpha_output_mi_thunk_osf): Likewise.
(alphaev4_insn_pipe): Likewise for param "insn".
(alphaev5_insn_pipe): Likewise.
(alphaev4_next_group): Likewise for return type and param 1
"insn".
(alphaev5_next_group): Likewise.
(alpha_align_insns_1): Likewise for return type and param 1 of
callback param "next_group", and for locals "i", "next", "prev",
"where", "where2", "insn".
2014-08-25 Bernd Schmidt <bernds@codesourcery.com> 2014-08-25 Bernd Schmidt <bernds@codesourcery.com>
* tree-nested.c (finalize_nesting_tree_1): Initialize temporary earlier * tree-nested.c (finalize_nesting_tree_1): Initialize temporary earlier
......
...@@ -2009,7 +2009,8 @@ alpha_emit_set_const (rtx target, enum machine_mode mode, ...@@ -2009,7 +2009,8 @@ alpha_emit_set_const (rtx target, enum machine_mode mode,
result = alpha_emit_set_const_1 (target, mode, c, i, no_output); result = alpha_emit_set_const_1 (target, mode, c, i, no_output);
if (result) if (result)
{ {
rtx insn, set; rtx_insn *insn;
rtx set;
if (no_output) if (no_output)
return result; return result;
...@@ -4955,7 +4956,8 @@ alpha_return_addr (int count, rtx frame ATTRIBUTE_UNUSED) ...@@ -4955,7 +4956,8 @@ alpha_return_addr (int count, rtx frame ATTRIBUTE_UNUSED)
rtx rtx
alpha_gp_save_rtx (void) alpha_gp_save_rtx (void)
{ {
rtx seq, m = cfun->machine->gp_save_rtx; rtx_insn *seq;
rtx m = cfun->machine->gp_save_rtx;
if (m == NULL) if (m == NULL)
{ {
...@@ -4993,7 +4995,7 @@ alpha_instantiate_decls (void) ...@@ -4993,7 +4995,7 @@ alpha_instantiate_decls (void)
static int static int
alpha_ra_ever_killed (void) alpha_ra_ever_killed (void)
{ {
rtx top; rtx_insn *top;
if (!has_hard_reg_initial_val (Pmode, REG_RA)) if (!has_hard_reg_initial_val (Pmode, REG_RA))
return (int)df_regs_ever_live_p (REG_RA); return (int)df_regs_ever_live_p (REG_RA);
...@@ -5139,7 +5141,7 @@ get_some_local_dynamic_name_1 (rtx *px, void *data ATTRIBUTE_UNUSED) ...@@ -5139,7 +5141,7 @@ get_some_local_dynamic_name_1 (rtx *px, void *data ATTRIBUTE_UNUSED)
static const char * static const char *
get_some_local_dynamic_name (void) get_some_local_dynamic_name (void)
{ {
rtx insn; rtx_insn *insn;
if (cfun->machine->some_ld_name) if (cfun->machine->some_ld_name)
return cfun->machine->some_ld_name; return cfun->machine->some_ld_name;
...@@ -7608,7 +7610,7 @@ alpha_find_lo_sum_using_gp (rtx insn) ...@@ -7608,7 +7610,7 @@ alpha_find_lo_sum_using_gp (rtx insn)
static int static int
alpha_does_function_need_gp (void) alpha_does_function_need_gp (void)
{ {
rtx insn; rtx_insn *insn;
/* The GP being variable is an OSF abi thing. */ /* The GP being variable is an OSF abi thing. */
if (! TARGET_ABI_OSF) if (! TARGET_ABI_OSF)
...@@ -7651,16 +7653,16 @@ alpha_does_function_need_gp (void) ...@@ -7651,16 +7653,16 @@ alpha_does_function_need_gp (void)
/* Helper function to set RTX_FRAME_RELATED_P on instructions, including /* Helper function to set RTX_FRAME_RELATED_P on instructions, including
sequences. */ sequences. */
static rtx static rtx_insn *
set_frame_related_p (void) set_frame_related_p (void)
{ {
rtx seq = get_insns (); rtx_insn *seq = get_insns ();
rtx insn; rtx_insn *insn;
end_sequence (); end_sequence ();
if (!seq) if (!seq)
return NULL_RTX; return NULL;
if (INSN_P (seq)) if (INSN_P (seq))
{ {
...@@ -7692,7 +7694,8 @@ static void ...@@ -7692,7 +7694,8 @@ static void
emit_frame_store_1 (rtx value, rtx base_reg, HOST_WIDE_INT frame_bias, emit_frame_store_1 (rtx value, rtx base_reg, HOST_WIDE_INT frame_bias,
HOST_WIDE_INT base_ofs, rtx frame_reg) HOST_WIDE_INT base_ofs, rtx frame_reg)
{ {
rtx addr, mem, insn; rtx addr, mem;
rtx_insn *insn;
addr = plus_constant (Pmode, base_reg, base_ofs); addr = plus_constant (Pmode, base_reg, base_ofs);
mem = gen_frame_mem (DImode, addr); mem = gen_frame_mem (DImode, addr);
...@@ -7953,8 +7956,9 @@ alpha_expand_prologue (void) ...@@ -7953,8 +7956,9 @@ alpha_expand_prologue (void)
/* Register frame procedures save the fp. */ /* Register frame procedures save the fp. */
if (alpha_procedure_type == PT_REGISTER) if (alpha_procedure_type == PT_REGISTER)
{ {
rtx insn = emit_move_insn (gen_rtx_REG (DImode, vms_save_fp_regno), rtx_insn *insn =
hard_frame_pointer_rtx); emit_move_insn (gen_rtx_REG (DImode, vms_save_fp_regno),
hard_frame_pointer_rtx);
add_reg_note (insn, REG_CFA_REGISTER, NULL); add_reg_note (insn, REG_CFA_REGISTER, NULL);
RTX_FRAME_RELATED_P (insn) = 1; RTX_FRAME_RELATED_P (insn) = 1;
} }
...@@ -7970,7 +7974,7 @@ alpha_expand_prologue (void) ...@@ -7970,7 +7974,7 @@ alpha_expand_prologue (void)
/* If we have to allocate space for outgoing args, do it now. */ /* If we have to allocate space for outgoing args, do it now. */
if (crtl->outgoing_args_size != 0) if (crtl->outgoing_args_size != 0)
{ {
rtx seq rtx_insn *seq
= emit_move_insn (stack_pointer_rtx, = emit_move_insn (stack_pointer_rtx,
plus_constant plus_constant
(Pmode, hard_frame_pointer_rtx, (Pmode, hard_frame_pointer_rtx,
...@@ -8410,7 +8414,7 @@ alpha_expand_epilogue (void) ...@@ -8410,7 +8414,7 @@ alpha_expand_epilogue (void)
void void
alpha_end_function (FILE *file, const char *fnname, tree decl ATTRIBUTE_UNUSED) alpha_end_function (FILE *file, const char *fnname, tree decl ATTRIBUTE_UNUSED)
{ {
rtx insn; rtx_insn *insn;
/* We output a nop after noreturn calls at the very end of the function to /* We output a nop after noreturn calls at the very end of the function to
ensure that the return address always remains in the caller's code range, ensure that the return address always remains in the caller's code range,
...@@ -8453,7 +8457,8 @@ alpha_output_mi_thunk_osf (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED, ...@@ -8453,7 +8457,8 @@ alpha_output_mi_thunk_osf (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
tree function) tree function)
{ {
HOST_WIDE_INT hi, lo; HOST_WIDE_INT hi, lo;
rtx this_rtx, insn, funexp; rtx this_rtx, funexp;
rtx_insn *insn;
/* We always require a valid GP. */ /* We always require a valid GP. */
emit_insn (gen_prologue_ldgp ()); emit_insn (gen_prologue_ldgp ());
...@@ -8914,7 +8919,7 @@ enum alphaev5_pipe { ...@@ -8914,7 +8919,7 @@ enum alphaev5_pipe {
}; };
static enum alphaev4_pipe static enum alphaev4_pipe
alphaev4_insn_pipe (rtx insn) alphaev4_insn_pipe (rtx_insn *insn)
{ {
if (recog_memoized (insn) < 0) if (recog_memoized (insn) < 0)
return EV4_STOP; return EV4_STOP;
...@@ -8963,7 +8968,7 @@ alphaev4_insn_pipe (rtx insn) ...@@ -8963,7 +8968,7 @@ alphaev4_insn_pipe (rtx insn)
} }
static enum alphaev5_pipe static enum alphaev5_pipe
alphaev5_insn_pipe (rtx insn) alphaev5_insn_pipe (rtx_insn *insn)
{ {
if (recog_memoized (insn) < 0) if (recog_memoized (insn) < 0)
return EV5_STOP; return EV5_STOP;
...@@ -9023,8 +9028,8 @@ alphaev5_insn_pipe (rtx insn) ...@@ -9023,8 +9028,8 @@ alphaev5_insn_pipe (rtx insn)
LEN is, of course, the length of the group in bytes. */ LEN is, of course, the length of the group in bytes. */
static rtx static rtx_insn *
alphaev4_next_group (rtx insn, int *pin_use, int *plen) alphaev4_next_group (rtx_insn *insn, int *pin_use, int *plen)
{ {
int len, in_use; int len, in_use;
...@@ -9121,8 +9126,8 @@ alphaev4_next_group (rtx insn, int *pin_use, int *plen) ...@@ -9121,8 +9126,8 @@ alphaev4_next_group (rtx insn, int *pin_use, int *plen)
LEN is, of course, the length of the group in bytes. */ LEN is, of course, the length of the group in bytes. */
static rtx static rtx_insn *
alphaev5_next_group (rtx insn, int *pin_use, int *plen) alphaev5_next_group (rtx_insn *insn, int *pin_use, int *plen)
{ {
int len, in_use; int len, in_use;
...@@ -9306,7 +9311,7 @@ alphaev5_next_nop (int *pin_use) ...@@ -9306,7 +9311,7 @@ alphaev5_next_nop (int *pin_use)
static void static void
alpha_align_insns_1 (unsigned int max_align, alpha_align_insns_1 (unsigned int max_align,
rtx (*next_group) (rtx, int *, int *), rtx_insn *(*next_group) (rtx_insn *, int *, int *),
rtx (*next_nop) (int *)) rtx (*next_nop) (int *))
{ {
/* ALIGN is the known alignment for the insn group. */ /* ALIGN is the known alignment for the insn group. */
...@@ -9314,7 +9319,7 @@ alpha_align_insns_1 (unsigned int max_align, ...@@ -9314,7 +9319,7 @@ alpha_align_insns_1 (unsigned int max_align,
/* OFS is the offset of the current insn in the insn group. */ /* OFS is the offset of the current insn in the insn group. */
int ofs; int ofs;
int prev_in_use, in_use, len, ldgp; int prev_in_use, in_use, len, ldgp;
rtx i, next; rtx_insn *i, *next;
/* Let shorten branches care for assigning alignments to code labels. */ /* Let shorten branches care for assigning alignments to code labels. */
shorten_branches (get_insns ()); shorten_branches (get_insns ());
...@@ -9372,7 +9377,7 @@ alpha_align_insns_1 (unsigned int max_align, ...@@ -9372,7 +9377,7 @@ alpha_align_insns_1 (unsigned int max_align,
else if ((int) align < len) else if ((int) align < len)
{ {
unsigned int new_log_align = len > 8 ? 4 : 3; unsigned int new_log_align = len > 8 ? 4 : 3;
rtx prev, where; rtx_insn *prev, *where;
where = prev = prev_nonnote_insn (i); where = prev = prev_nonnote_insn (i);
if (!where || !LABEL_P (where)) if (!where || !LABEL_P (where))
...@@ -9401,7 +9406,7 @@ alpha_align_insns_1 (unsigned int max_align, ...@@ -9401,7 +9406,7 @@ alpha_align_insns_1 (unsigned int max_align,
else if (ofs + len > (int) align) else if (ofs + len > (int) align)
{ {
int nop_count = (align - ofs) / 4; int nop_count = (align - ofs) / 4;
rtx where; rtx_insn *where;
/* Insert nops before labels, branches, and calls to truly merge /* Insert nops before labels, branches, and calls to truly merge
the execution of the nops with the previous instruction group. */ the execution of the nops with the previous instruction group. */
...@@ -9410,7 +9415,7 @@ alpha_align_insns_1 (unsigned int max_align, ...@@ -9410,7 +9415,7 @@ alpha_align_insns_1 (unsigned int max_align,
{ {
if (LABEL_P (where)) if (LABEL_P (where))
{ {
rtx where2 = prev_nonnote_insn (where); rtx_insn *where2 = prev_nonnote_insn (where);
if (where2 && JUMP_P (where2)) if (where2 && JUMP_P (where2))
where = where2; where = where2;
} }
...@@ -9448,7 +9453,7 @@ alpha_align_insns (void) ...@@ -9448,7 +9453,7 @@ alpha_align_insns (void)
static void static void
alpha_pad_function_end (void) alpha_pad_function_end (void)
{ {
rtx insn, next; rtx_insn *insn, *next;
for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment