Commit 691fe203 by David Malcolm Committed by David Malcolm

function.c: Use rtx_insn

gcc/
	* function.c (emit_initial_value_sets): Strengthen local "seq"
	from rtx to rtx_insn *.
	(instantiate_virtual_regs_in_insn): Likewise for param "insn" and
	local "seq".
	(instantiate_virtual_regs): Likewise for local "insn".
	(assign_parm_setup_reg): Likewise for locals "linsn", "sinsn".
	(reorder_blocks_1): Likewise for param "insns" and local "insn".
	(expand_function_end): Likewise for locals "insn" and "seq".
	(epilogue_done): Likewise for local "insn".
	(thread_prologue_and_epilogue_insns): Likewise for locals "prev",
	"last", "trial".
	(reposition_prologue_and_epilogue_notes): Likewise for locals
	"insn", "last", "note", "first".
	(match_asm_constraints_1): Likewise for param "insn" and local "insns".
	(pass_match_asm_constraints::execute): Likewise for local "insn".

From-SVN: r214327
parent fa7af581
2014-08-22 David Malcolm <dmalcolm@redhat.com> 2014-08-22 David Malcolm <dmalcolm@redhat.com>
* function.c (emit_initial_value_sets): Strengthen local "seq"
from rtx to rtx_insn *.
(instantiate_virtual_regs_in_insn): Likewise for param "insn" and
local "seq".
(instantiate_virtual_regs): Likewise for local "insn".
(assign_parm_setup_reg): Likewise for locals "linsn", "sinsn".
(reorder_blocks_1): Likewise for param "insns" and local "insn".
(expand_function_end): Likewise for locals "insn" and "seq".
(epilogue_done): Likewise for local "insn".
(thread_prologue_and_epilogue_insns): Likewise for locals "prev",
"last", "trial".
(reposition_prologue_and_epilogue_notes): Likewise for locals
"insn", "last", "note", "first".
(match_asm_constraints_1): Likewise for param "insn" and local "insns".
(pass_match_asm_constraints::execute): Likewise for local "insn".
2014-08-22 David Malcolm <dmalcolm@redhat.com>
* output.h (final_scan_insn): Strengthen return type from rtx to * output.h (final_scan_insn): Strengthen return type from rtx to
rtx_insn *. rtx_insn *.
(final_forward_branch_p): Likewise for param. (final_forward_branch_p): Likewise for param.
......
...@@ -115,7 +115,7 @@ vec<tree, va_gc> *types_used_by_cur_var_decl; ...@@ -115,7 +115,7 @@ vec<tree, va_gc> *types_used_by_cur_var_decl;
static struct temp_slot *find_temp_slot_from_address (rtx); static struct temp_slot *find_temp_slot_from_address (rtx);
static void pad_to_arg_alignment (struct args_size *, int, struct args_size *); static void pad_to_arg_alignment (struct args_size *, int, struct args_size *);
static void pad_below (struct args_size *, enum machine_mode, tree); static void pad_below (struct args_size *, enum machine_mode, tree);
static void reorder_blocks_1 (rtx, tree, vec<tree> *); static void reorder_blocks_1 (rtx_insn *, tree, vec<tree> *);
static int all_blocks (tree, tree *); static int all_blocks (tree, tree *);
static tree *get_block_vector (tree, int *); static tree *get_block_vector (tree, int *);
extern tree debug_find_var_in_block_tree (tree, tree); extern tree debug_find_var_in_block_tree (tree, tree);
...@@ -1300,7 +1300,7 @@ emit_initial_value_sets (void) ...@@ -1300,7 +1300,7 @@ emit_initial_value_sets (void)
{ {
struct initial_value_struct *ivs = crtl->hard_reg_initial_vals; struct initial_value_struct *ivs = crtl->hard_reg_initial_vals;
int i; int i;
rtx seq; rtx_insn *seq;
if (ivs == 0) if (ivs == 0)
return 0; return 0;
...@@ -1497,12 +1497,13 @@ safe_insn_predicate (int code, int operand, rtx x) ...@@ -1497,12 +1497,13 @@ safe_insn_predicate (int code, int operand, rtx x)
registers present inside of insn. The result will be a valid insn. */ registers present inside of insn. The result will be a valid insn. */
static void static void
instantiate_virtual_regs_in_insn (rtx insn) instantiate_virtual_regs_in_insn (rtx_insn *insn)
{ {
HOST_WIDE_INT offset; HOST_WIDE_INT offset;
int insn_code, i; int insn_code, i;
bool any_change = false; bool any_change = false;
rtx set, new_rtx, x, seq; rtx set, new_rtx, x;
rtx_insn *seq;
/* There are some special cases to be handled first. */ /* There are some special cases to be handled first. */
set = single_set (insn); set = single_set (insn);
...@@ -1898,7 +1899,7 @@ instantiate_decls (tree fndecl) ...@@ -1898,7 +1899,7 @@ instantiate_decls (tree fndecl)
static unsigned int static unsigned int
instantiate_virtual_regs (void) instantiate_virtual_regs (void)
{ {
rtx insn; rtx_insn *insn;
/* Compute the offsets to use for this function. */ /* Compute the offsets to use for this function. */
in_arg_offset = FIRST_PARM_OFFSET (current_function_decl); in_arg_offset = FIRST_PARM_OFFSET (current_function_decl);
...@@ -3172,8 +3173,9 @@ assign_parm_setup_reg (struct assign_parm_data_all *all, tree parm, ...@@ -3172,8 +3173,9 @@ assign_parm_setup_reg (struct assign_parm_data_all *all, tree parm,
&& reg_mentioned_p (virtual_incoming_args_rtx, && reg_mentioned_p (virtual_incoming_args_rtx,
XEXP (data->stack_parm, 0))) XEXP (data->stack_parm, 0)))
{ {
rtx linsn = get_last_insn (); rtx_insn *linsn = get_last_insn ();
rtx sinsn, set; rtx_insn *sinsn;
rtx set;
/* Mark complex types separately. */ /* Mark complex types separately. */
if (GET_CODE (parmreg) == CONCAT) if (GET_CODE (parmreg) == CONCAT)
...@@ -4156,9 +4158,10 @@ clear_block_marks (tree block) ...@@ -4156,9 +4158,10 @@ clear_block_marks (tree block)
} }
static void static void
reorder_blocks_1 (rtx insns, tree current_block, vec<tree> *p_block_stack) reorder_blocks_1 (rtx_insn *insns, tree current_block,
vec<tree> *p_block_stack)
{ {
rtx insn; rtx_insn *insn;
tree prev_beg = NULL_TREE, prev_end = NULL_TREE; tree prev_beg = NULL_TREE, prev_end = NULL_TREE;
for (insn = insns; insn; insn = NEXT_INSN (insn)) for (insn = insns; insn; insn = NEXT_INSN (insn))
...@@ -5006,7 +5009,7 @@ expand_function_end (void) ...@@ -5006,7 +5009,7 @@ expand_function_end (void)
space for another stack frame. */ space for another stack frame. */
if (flag_stack_check == GENERIC_STACK_CHECK) if (flag_stack_check == GENERIC_STACK_CHECK)
{ {
rtx insn, seq; rtx_insn *insn, *seq;
for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
if (CALL_P (insn)) if (CALL_P (insn))
...@@ -5765,7 +5768,7 @@ thread_prologue_and_epilogue_insns (void) ...@@ -5765,7 +5768,7 @@ thread_prologue_and_epilogue_insns (void)
EPILOGUE_BEG note and mark the insns as epilogue insns. */ EPILOGUE_BEG note and mark the insns as epilogue insns. */
FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR_FOR_FN (cfun)->preds) FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR_FOR_FN (cfun)->preds)
{ {
rtx prev, last, trial; rtx_insn *prev, *last, *trial;
if (e->flags & EDGE_FALLTHRU) if (e->flags & EDGE_FALLTHRU)
continue; continue;
...@@ -5874,7 +5877,7 @@ epilogue_done: ...@@ -5874,7 +5877,7 @@ epilogue_done:
) )
{ {
basic_block bb = e->src; basic_block bb = e->src;
rtx insn = BB_END (bb); rtx_insn *insn = BB_END (bb);
rtx ep_seq; rtx ep_seq;
if (!CALL_P (insn) if (!CALL_P (insn)
...@@ -5953,7 +5956,7 @@ reposition_prologue_and_epilogue_notes (void) ...@@ -5953,7 +5956,7 @@ reposition_prologue_and_epilogue_notes (void)
if (prologue_insn_hash != NULL) if (prologue_insn_hash != NULL)
{ {
size_t len = htab_elements (prologue_insn_hash); size_t len = htab_elements (prologue_insn_hash);
rtx insn, last = NULL, note = NULL; rtx_insn *insn, *last = NULL, *note = NULL;
/* Scan from the beginning until we reach the last prologue insn. */ /* Scan from the beginning until we reach the last prologue insn. */
/* ??? While we do have the CFG intact, there are two problems: /* ??? While we do have the CFG intact, there are two problems:
...@@ -6004,7 +6007,7 @@ reposition_prologue_and_epilogue_notes (void) ...@@ -6004,7 +6007,7 @@ reposition_prologue_and_epilogue_notes (void)
FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR_FOR_FN (cfun)->preds) FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR_FOR_FN (cfun)->preds)
{ {
rtx insn, first = NULL, note = NULL; rtx_insn *insn, *first = NULL, *note = NULL;
basic_block bb = e->src; basic_block bb = e->src;
/* Scan from the beginning until we reach the first epilogue insn. */ /* Scan from the beginning until we reach the first epilogue insn. */
...@@ -6334,7 +6337,7 @@ make_pass_thread_prologue_and_epilogue (gcc::context *ctxt) ...@@ -6334,7 +6337,7 @@ make_pass_thread_prologue_and_epilogue (gcc::context *ctxt)
asm ("": "=mr" (inout_2) : "0" (inout_2)); */ asm ("": "=mr" (inout_2) : "0" (inout_2)); */
static void static void
match_asm_constraints_1 (rtx insn, rtx *p_sets, int noutputs) match_asm_constraints_1 (rtx_insn *insn, rtx *p_sets, int noutputs)
{ {
int i; int i;
bool changed = false; bool changed = false;
...@@ -6346,7 +6349,8 @@ match_asm_constraints_1 (rtx insn, rtx *p_sets, int noutputs) ...@@ -6346,7 +6349,8 @@ match_asm_constraints_1 (rtx insn, rtx *p_sets, int noutputs)
memset (output_matched, 0, noutputs * sizeof (bool)); memset (output_matched, 0, noutputs * sizeof (bool));
for (i = 0; i < ninputs; i++) for (i = 0; i < ninputs; i++)
{ {
rtx input, output, insns; rtx input, output;
rtx_insn *insns;
const char *constraint = ASM_OPERANDS_INPUT_CONSTRAINT (op, i); const char *constraint = ASM_OPERANDS_INPUT_CONSTRAINT (op, i);
char *end; char *end;
int match, j; int match, j;
...@@ -6466,7 +6470,8 @@ unsigned ...@@ -6466,7 +6470,8 @@ unsigned
pass_match_asm_constraints::execute (function *fun) pass_match_asm_constraints::execute (function *fun)
{ {
basic_block bb; basic_block bb;
rtx insn, pat, *p_sets; rtx_insn *insn;
rtx pat, *p_sets;
int noutputs; int noutputs;
if (!crtl->has_asm_statement) if (!crtl->has_asm_statement)
......
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