Commit a755f004 by David Malcolm Committed by David Malcolm

regrename.c: Use rtx_insn

gcc/
	* regrename.c (create_new_chain): Strengthen param "insn" from rtx
	to rtx_insn *.
	(init_rename_info): Replace use of NULL_RTX with NULL when dealing
	with an insn.
	(regrename_analyze): Strengthen local "insn" from rtx to
	rtx_insn *.
	(scan_rtx_reg): Likewise for param "insn".
	(scan_rtx_address): Likewise.
	(scan_rtx): Likewise.
	(restore_operands): Likewise.
	(record_out_operands): Likewise.
	(build_def_use): Likewise for local "insn".  Replace use of
	NULL_RTX with NULL when dealing with an insn.

From-SVN: r214368
parent f6956569
2014-08-22 David Malcolm <dmalcolm@redhat.com> 2014-08-22 David Malcolm <dmalcolm@redhat.com>
* regrename.c (create_new_chain): Strengthen param "insn" from rtx
to rtx_insn *.
(init_rename_info): Replace use of NULL_RTX with NULL when dealing
with an insn.
(regrename_analyze): Strengthen local "insn" from rtx to
rtx_insn *.
(scan_rtx_reg): Likewise for param "insn".
(scan_rtx_address): Likewise.
(scan_rtx): Likewise.
(restore_operands): Likewise.
(record_out_operands): Likewise.
(build_def_use): Likewise for local "insn". Replace use of
NULL_RTX with NULL when dealing with an insn.
2014-08-22 David Malcolm <dmalcolm@redhat.com>
* rtl.h (reg_scan): Strengthen param "f" from rtx to rtx_insn *. * rtl.h (reg_scan): Strengthen param "f" from rtx to rtx_insn *.
* reginfo.c (reg_scan): Likewise, also for local "insn". * reginfo.c (reg_scan): Likewise, also for local "insn".
(reg_scan_mark_refs): Likewise for param "insn". (reg_scan_mark_refs): Likewise for param "insn".
......
...@@ -107,7 +107,7 @@ static struct obstack rename_obstack; ...@@ -107,7 +107,7 @@ static struct obstack rename_obstack;
information about insn operands, and we store it here. */ information about insn operands, and we store it here. */
vec<insn_rr_info> insn_rr; vec<insn_rr_info> insn_rr;
static void scan_rtx (rtx, rtx *, enum reg_class, enum scan_actions, static void scan_rtx (rtx_insn *, rtx *, enum reg_class, enum scan_actions,
enum op_type); enum op_type);
static bool build_def_use (basic_block); static bool build_def_use (basic_block);
...@@ -219,7 +219,7 @@ record_operand_use (struct du_head *head, struct du_chain *this_du) ...@@ -219,7 +219,7 @@ record_operand_use (struct du_head *head, struct du_chain *this_du)
static du_head_p static du_head_p
create_new_chain (unsigned this_regno, unsigned this_nregs, rtx *loc, create_new_chain (unsigned this_regno, unsigned this_nregs, rtx *loc,
rtx insn, enum reg_class cl) rtx_insn *insn, enum reg_class cl)
{ {
struct du_head *head = XOBNEW (&rename_obstack, struct du_head); struct du_head *head = XOBNEW (&rename_obstack, struct du_head);
struct du_chain *this_du; struct du_chain *this_du;
...@@ -576,7 +576,7 @@ init_rename_info (struct bb_rename_info *p, basic_block bb) ...@@ -576,7 +576,7 @@ init_rename_info (struct bb_rename_info *p, basic_block bb)
du_head_p chain; du_head_p chain;
if (dump_file) if (dump_file)
fprintf (dump_file, "opening incoming chain\n"); fprintf (dump_file, "opening incoming chain\n");
chain = create_new_chain (i, iri->nregs, NULL, NULL_RTX, NO_REGS); chain = create_new_chain (i, iri->nregs, NULL, NULL, NO_REGS);
bitmap_set_bit (&p->incoming_open_chains_set, chain->id); bitmap_set_bit (&p->incoming_open_chains_set, chain->id);
} }
} }
...@@ -721,7 +721,7 @@ regrename_analyze (bitmap bb_mask) ...@@ -721,7 +721,7 @@ regrename_analyze (bitmap bb_mask)
open_chains = NULL; open_chains = NULL;
if (insn_rr.exists ()) if (insn_rr.exists ())
{ {
rtx insn; rtx_insn *insn;
FOR_BB_INSNS (bb1, insn) FOR_BB_INSNS (bb1, insn)
{ {
insn_rr_info *p = &insn_rr[INSN_UID (insn)]; insn_rr_info *p = &insn_rr[INSN_UID (insn)];
...@@ -1020,7 +1020,7 @@ note_sets_clobbers (rtx x, const_rtx set, void *data) ...@@ -1020,7 +1020,7 @@ note_sets_clobbers (rtx x, const_rtx set, void *data)
} }
static void static void
scan_rtx_reg (rtx insn, rtx *loc, enum reg_class cl, enum scan_actions action, scan_rtx_reg (rtx_insn *insn, rtx *loc, enum reg_class cl, enum scan_actions action,
enum op_type type) enum op_type type)
{ {
struct du_head **p; struct du_head **p;
...@@ -1175,7 +1175,7 @@ scan_rtx_reg (rtx insn, rtx *loc, enum reg_class cl, enum scan_actions action, ...@@ -1175,7 +1175,7 @@ scan_rtx_reg (rtx insn, rtx *loc, enum reg_class cl, enum scan_actions action,
BASE_REG_CLASS depending on how the register is being considered. */ BASE_REG_CLASS depending on how the register is being considered. */
static void static void
scan_rtx_address (rtx insn, rtx *loc, enum reg_class cl, scan_rtx_address (rtx_insn *insn, rtx *loc, enum reg_class cl,
enum scan_actions action, enum machine_mode mode, enum scan_actions action, enum machine_mode mode,
addr_space_t as) addr_space_t as)
{ {
...@@ -1325,7 +1325,7 @@ scan_rtx_address (rtx insn, rtx *loc, enum reg_class cl, ...@@ -1325,7 +1325,7 @@ scan_rtx_address (rtx insn, rtx *loc, enum reg_class cl,
} }
static void static void
scan_rtx (rtx insn, rtx *loc, enum reg_class cl, enum scan_actions action, scan_rtx (rtx_insn *insn, rtx *loc, enum reg_class cl, enum scan_actions action,
enum op_type type) enum op_type type)
{ {
const char *fmt; const char *fmt;
...@@ -1455,7 +1455,7 @@ hide_operands (int n_ops, rtx *old_operands, rtx *old_dups, ...@@ -1455,7 +1455,7 @@ hide_operands (int n_ops, rtx *old_operands, rtx *old_dups,
are processing; the arguments are the same as in hide_operands. */ are processing; the arguments are the same as in hide_operands. */
static void static void
restore_operands (rtx insn, int n_ops, rtx *old_operands, rtx *old_dups) restore_operands (rtx_insn *insn, int n_ops, rtx *old_operands, rtx *old_dups)
{ {
int i; int i;
for (i = 0; i < recog_data.n_dups; i++) for (i = 0; i < recog_data.n_dups; i++)
...@@ -1472,7 +1472,7 @@ restore_operands (rtx insn, int n_ops, rtx *old_operands, rtx *old_dups) ...@@ -1472,7 +1472,7 @@ restore_operands (rtx insn, int n_ops, rtx *old_operands, rtx *old_dups)
record information about the operands in the insn. */ record information about the operands in the insn. */
static void static void
record_out_operands (rtx insn, bool earlyclobber, insn_rr_info *insn_info) record_out_operands (rtx_insn *insn, bool earlyclobber, insn_rr_info *insn_info)
{ {
int n_ops = recog_data.n_operands; int n_ops = recog_data.n_operands;
const operand_alternative *op_alt = which_op_alt (); const operand_alternative *op_alt = which_op_alt ();
...@@ -1522,7 +1522,7 @@ record_out_operands (rtx insn, bool earlyclobber, insn_rr_info *insn_info) ...@@ -1522,7 +1522,7 @@ record_out_operands (rtx insn, bool earlyclobber, insn_rr_info *insn_info)
static bool static bool
build_def_use (basic_block bb) build_def_use (basic_block bb)
{ {
rtx insn; rtx_insn *insn;
unsigned HOST_WIDE_INT untracked_operands; unsigned HOST_WIDE_INT untracked_operands;
fail_current_block = false; fail_current_block = false;
...@@ -1619,7 +1619,7 @@ build_def_use (basic_block bb) ...@@ -1619,7 +1619,7 @@ build_def_use (basic_block bb)
enum machine_mode mode = GET_MODE (op); enum machine_mode mode = GET_MODE (op);
unsigned this_regno = REGNO (op); unsigned this_regno = REGNO (op);
unsigned this_nregs = hard_regno_nregs[this_regno][mode]; unsigned this_nregs = hard_regno_nregs[this_regno][mode];
create_new_chain (this_regno, this_nregs, NULL, NULL_RTX, create_new_chain (this_regno, this_nregs, NULL, NULL,
NO_REGS); NO_REGS);
} }
} }
......
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