Remove DF_REF_INSN scaffolding

gcc/
2014-08-26  David Malcolm  <dmalcolm@redhat.com>

	* df.h (df_dump_insn_problem_function): Strengthen first param of
	this callback from const_rtx to const rtx_insn *.
	(struct df_insn_info): Strengthen field "insn" from rtx to
	rtx_insn *.
	(DF_REF_INSN): Eliminate this function, reinstating the older
	macro definition.
	(df_find_def): Strengthen param 1 from rtx to rtx_insn *.
	(df_reg_defined): Likewise.
	(df_find_use): Likewise.
	(df_reg_used): Likewise.
	(df_dump_insn_top): Strengthen param 1 from const_rtx to
	const rtx_insn *.
	(df_dump_insn_bottom): Likewise.
	(df_insn_debug): Strengthen param 1 from rtx to rtx_insn *.
	(df_insn_debug_regno): Likewise.
	(debug_df_insn): Likewise.
	(df_rd_simulate_one_insn): Likewise for param 2.
	(df_word_lr_simulate_defs): Likewise for param 1.
	(df_word_lr_simulate_uses): Likewise.
	(df_md_simulate_one_insn): Likewise for param 2.
	(df_simulate_find_noclobber_defs): Likewise for param 1.
	(df_simulate_find_defs): Likewise.
	(df_simulate_defs): Likewise.
	(df_simulate_uses): Likewise.
	(df_simulate_one_insn_backwards): Likewise for param 2.
	(df_simulate_one_insn_forwards): Likewise.
	(df_uses_create): Likewise for param 2.
	(df_insn_create_insn_record): Likewise for param 1.
	(df_insn_delete): Likewise.
	(df_insn_rescan): Likewise.
	(df_insn_rescan_debug_internal): Likewise.
	(df_insn_change_bb): Likewise.
	(df_notes_rescan): Likewise.
	* rtl.h (remove_death): Likewise for param 2.
	(print_rtl_with_bb): Strengthen param 2 from const_rtx to
	const rtx_insn *.
	* sched-int.h (reemit_notes): Strengthen param from rtx to
	rtx_insn *.
	* valtrack.h (propagate_for_debug): Likewise for param 1.

	* cfgrtl.c (print_rtl_with_bb): Strengthen param "rtx_first" and
	local "tmp_rtx" from const_rtx to const rtx_insn *.
	* combine.c (remove_death): Strengthen param "insn" from rtx to
	rtx_insn *.
	(move_deaths): Likewise for local "where_dead".
	* cse.c (delete_trivially_dead_insns): Introduce local
	"bind_var_loc" so that "bind" can be strengthened to an rtx_insn *.
	* df-core.c (df_find_def): Strengthen param "insn" from rtx to
	rtx_insn *.
	(df_reg_defined): Likewise.
	(df_find_use): Likewise.
	(df_reg_used): Likewise.
	(df_dump_insn_problem_data): Strengthen param "insn" from
	const_rtx to const rtx_insn *.
	(df_dump_insn_top): Likewise.
	(df_dump_insn_bottom): Likewise.
	(df_insn_debug): Strengthen param "insn" from rtx to rtx_insn *.
	(df_insn_debug_regno): Likewise.
	(debug_df_insn): Likewise.
	(DF_REF_INSN): Delete.
	* df-problems.c (df_rd_simulate_one_insn): Strengthen param "insn"
	from rtx to rtx_insn *.
	(df_chain_insn_top_dump): Strengthen param "insn" from
	const_rtx to const rtx_insn *.
	(df_chain_insn_bottom_dump): Likewise.
	(df_word_lr_simulate_defs): Strengthen param "insn" from rtx to
	rtx_insn *.
	(df_word_lr_simulate_uses): Likewise.
	(df_print_note): Likewise.
	(df_remove_dead_and_unused_notes): Likewise.
	(df_set_unused_notes_for_mw): Likewise.
	(df_set_dead_notes_for_mw): Likewise.
	(df_create_unused_note): Likewise.
	(df_simulate_find_defs): Likewise.
	(df_simulate_find_uses): Likewise.
	(df_simulate_find_noclobber_defs): Likewise.
	(df_simulate_defs): Likewise.
	(df_simulate_uses): Likewise.
	(df_simulate_one_insn_backwards): Likewise.
	(df_simulate_one_insn_forwards): Likewise.
	(df_md_simulate_one_insn): Likewise.
	* df-scan.c (df_uses_create): Likewise.
	(df_insn_create_insn_record): Likewise.
	(df_insn_delete): Likewise.
	(df_insn_rescan): Likewise.
	(df_insn_rescan_debug_internal): Likewise.
	(df_insn_change_bb): Likewise.
	(df_notes_rescan): Likewise.
	(df_refs_add_to_chains): Likewise.
	(df_insn_refs_verify): Likewise.
	* emit-rtl.c (set_insn_deleted): Add checked cast to rtx_insn *
	when invoking df_insn_delete.
	(reorder_insns): Strengthen local "x" from rtx to rtx_insn *.
	(set_unique_reg_note): Add checked cast.
	* final.c (cleanup_subreg_operands): Likewise.
	* gcse.c (update_ld_motion_stores): Likewise, strengthening local
	"insn" from rtx to rtx_insn *.
	* haifa-sched.c (reemit_notes): Strengthen param "insn" and local
	"last" from rtx to rtx_insn *.
	* ira-emit.c (change_regs_in_insn): New function.
	(change_loop): Strengthen local "insn" from rtx to rtx_insn *.
	Invoke change_regs_in_insn rather than change_regs.
	* ira.c (update_equiv_regs): Strengthen locals "insn",
	"init_insn", "new_insn" from rtx to rtx_insn *.  Invoke
	for_each_rtx_in_insn rather than for_each_rtx.
	* recog.c (confirm_change_group): Add checked casts.
	(peep2_update_life): Strengthen local "x" from rtx to rtx_insn *.
	Add checked cast.
	(peep2_fill_buffer): Add checked cast.
	* rtlanal.c (remove_note): Likewise.
	* valtrack.c (propagate_for_debug): Strengthen param "insn" and
	locals "next" "end" from rtx to rtx_insn *.

/
2014-08-26  David Malcolm  <dmalcolm@redhat.com>

	* rtx-classes-status.txt (TODO): DF_REF_INSN is done.

From-SVN: r214548
This commit is contained in:
David Malcolm 2014-08-26 20:39:42 +00:00 committed by David Malcolm
parent f57aa6b04a
commit b2908ba6db
22 changed files with 240 additions and 111 deletions

View File

@ -1,3 +1,7 @@
2014-08-26 David Malcolm <dmalcolm@redhat.com>
* rtx-classes-status.txt (TODO): DF_REF_INSN is done.
2014-08-26 David Malcolm <dmalcolm@redhat.com> 2014-08-26 David Malcolm <dmalcolm@redhat.com>
* rtx-classes-status.txt (TODO): SET_BB_HEAD, SET_BB_END, * rtx-classes-status.txt (TODO): SET_BB_HEAD, SET_BB_END,

View File

@ -1,3 +1,118 @@
2014-08-26 David Malcolm <dmalcolm@redhat.com>
* df.h (df_dump_insn_problem_function): Strengthen first param of
this callback from const_rtx to const rtx_insn *.
(struct df_insn_info): Strengthen field "insn" from rtx to
rtx_insn *.
(DF_REF_INSN): Eliminate this function, reinstating the older
macro definition.
(df_find_def): Strengthen param 1 from rtx to rtx_insn *.
(df_reg_defined): Likewise.
(df_find_use): Likewise.
(df_reg_used): Likewise.
(df_dump_insn_top): Strengthen param 1 from const_rtx to
const rtx_insn *.
(df_dump_insn_bottom): Likewise.
(df_insn_debug): Strengthen param 1 from rtx to rtx_insn *.
(df_insn_debug_regno): Likewise.
(debug_df_insn): Likewise.
(df_rd_simulate_one_insn): Likewise for param 2.
(df_word_lr_simulate_defs): Likewise for param 1.
(df_word_lr_simulate_uses): Likewise.
(df_md_simulate_one_insn): Likewise for param 2.
(df_simulate_find_noclobber_defs): Likewise for param 1.
(df_simulate_find_defs): Likewise.
(df_simulate_defs): Likewise.
(df_simulate_uses): Likewise.
(df_simulate_one_insn_backwards): Likewise for param 2.
(df_simulate_one_insn_forwards): Likewise.
(df_uses_create): Likewise for param 2.
(df_insn_create_insn_record): Likewise for param 1.
(df_insn_delete): Likewise.
(df_insn_rescan): Likewise.
(df_insn_rescan_debug_internal): Likewise.
(df_insn_change_bb): Likewise.
(df_notes_rescan): Likewise.
* rtl.h (remove_death): Likewise for param 2.
(print_rtl_with_bb): Strengthen param 2 from const_rtx to
const rtx_insn *.
* sched-int.h (reemit_notes): Strengthen param from rtx to
rtx_insn *.
* valtrack.h (propagate_for_debug): Likewise for param 1.
* cfgrtl.c (print_rtl_with_bb): Strengthen param "rtx_first" and
local "tmp_rtx" from const_rtx to const rtx_insn *.
* combine.c (remove_death): Strengthen param "insn" from rtx to
rtx_insn *.
(move_deaths): Likewise for local "where_dead".
* cse.c (delete_trivially_dead_insns): Introduce local
"bind_var_loc" so that "bind" can be strengthened to an rtx_insn *.
* df-core.c (df_find_def): Strengthen param "insn" from rtx to
rtx_insn *.
(df_reg_defined): Likewise.
(df_find_use): Likewise.
(df_reg_used): Likewise.
(df_dump_insn_problem_data): Strengthen param "insn" from
const_rtx to const rtx_insn *.
(df_dump_insn_top): Likewise.
(df_dump_insn_bottom): Likewise.
(df_insn_debug): Strengthen param "insn" from rtx to rtx_insn *.
(df_insn_debug_regno): Likewise.
(debug_df_insn): Likewise.
(DF_REF_INSN): Delete.
* df-problems.c (df_rd_simulate_one_insn): Strengthen param "insn"
from rtx to rtx_insn *.
(df_chain_insn_top_dump): Strengthen param "insn" from
const_rtx to const rtx_insn *.
(df_chain_insn_bottom_dump): Likewise.
(df_word_lr_simulate_defs): Strengthen param "insn" from rtx to
rtx_insn *.
(df_word_lr_simulate_uses): Likewise.
(df_print_note): Likewise.
(df_remove_dead_and_unused_notes): Likewise.
(df_set_unused_notes_for_mw): Likewise.
(df_set_dead_notes_for_mw): Likewise.
(df_create_unused_note): Likewise.
(df_simulate_find_defs): Likewise.
(df_simulate_find_uses): Likewise.
(df_simulate_find_noclobber_defs): Likewise.
(df_simulate_defs): Likewise.
(df_simulate_uses): Likewise.
(df_simulate_one_insn_backwards): Likewise.
(df_simulate_one_insn_forwards): Likewise.
(df_md_simulate_one_insn): Likewise.
* df-scan.c (df_uses_create): Likewise.
(df_insn_create_insn_record): Likewise.
(df_insn_delete): Likewise.
(df_insn_rescan): Likewise.
(df_insn_rescan_debug_internal): Likewise.
(df_insn_change_bb): Likewise.
(df_notes_rescan): Likewise.
(df_refs_add_to_chains): Likewise.
(df_insn_refs_verify): Likewise.
* emit-rtl.c (set_insn_deleted): Add checked cast to rtx_insn *
when invoking df_insn_delete.
(reorder_insns): Strengthen local "x" from rtx to rtx_insn *.
(set_unique_reg_note): Add checked cast.
* final.c (cleanup_subreg_operands): Likewise.
* gcse.c (update_ld_motion_stores): Likewise, strengthening local
"insn" from rtx to rtx_insn *.
* haifa-sched.c (reemit_notes): Strengthen param "insn" and local
"last" from rtx to rtx_insn *.
* ira-emit.c (change_regs_in_insn): New function.
(change_loop): Strengthen local "insn" from rtx to rtx_insn *.
Invoke change_regs_in_insn rather than change_regs.
* ira.c (update_equiv_regs): Strengthen locals "insn",
"init_insn", "new_insn" from rtx to rtx_insn *. Invoke
for_each_rtx_in_insn rather than for_each_rtx.
* recog.c (confirm_change_group): Add checked casts.
(peep2_update_life): Strengthen local "x" from rtx to rtx_insn *.
Add checked cast.
(peep2_fill_buffer): Add checked cast.
* rtlanal.c (remove_note): Likewise.
* valtrack.c (propagate_for_debug): Strengthen param "insn" and
locals "next" "end" from rtx to rtx_insn *.
2014-08-26 David Malcolm <dmalcolm@redhat.com> 2014-08-26 David Malcolm <dmalcolm@redhat.com>
* sched-int.h (sched_init_insn_luid): Strengthen param 1 from rtx * sched-int.h (sched_init_insn_luid): Strengthen param 1 from rtx

View File

@ -2128,9 +2128,9 @@ rtl_dump_bb (FILE *outf, basic_block bb, int indent, int flags)
in dumpfile.h. */ in dumpfile.h. */
void void
print_rtl_with_bb (FILE *outf, const_rtx rtx_first, int flags) print_rtl_with_bb (FILE *outf, const rtx_insn *rtx_first, int flags)
{ {
const_rtx tmp_rtx; const rtx_insn *tmp_rtx;
if (rtx_first == 0) if (rtx_first == 0)
fprintf (outf, "(nil)\n"); fprintf (outf, "(nil)\n");
else else

View File

@ -12997,7 +12997,7 @@ mark_used_regs_combine (rtx x)
Return the note used to record the death, if there was one. */ Return the note used to record the death, if there was one. */
rtx rtx
remove_death (unsigned int regno, rtx insn) remove_death (unsigned int regno, rtx_insn *insn)
{ {
rtx note = find_regno_note (insn, REG_DEAD, regno); rtx note = find_regno_note (insn, REG_DEAD, regno);
@ -13028,7 +13028,7 @@ move_deaths (rtx x, rtx maybe_kill_insn, int from_luid, rtx_insn *to_insn,
if (code == REG) if (code == REG)
{ {
unsigned int regno = REGNO (x); unsigned int regno = REGNO (x);
rtx where_dead = reg_stat[regno].last_death; rtx_insn *where_dead = reg_stat[regno].last_death;
/* Don't move the register if it gets killed in between from and to. */ /* Don't move the register if it gets killed in between from and to. */
if (maybe_kill_insn && reg_set_p (x, maybe_kill_insn) if (maybe_kill_insn && reg_set_p (x, maybe_kill_insn)

View File

@ -7025,20 +7025,22 @@ delete_trivially_dead_insns (rtx_insn *insns, int nreg)
&& !side_effects_p (SET_SRC (set)) && !side_effects_p (SET_SRC (set))
&& asm_noperands (PATTERN (insn)) < 0) && asm_noperands (PATTERN (insn)) < 0)
{ {
rtx dval, bind; rtx dval, bind_var_loc;
rtx_insn *bind;
/* Create DEBUG_EXPR (and DEBUG_EXPR_DECL). */ /* Create DEBUG_EXPR (and DEBUG_EXPR_DECL). */
dval = make_debug_expr_from_rtl (SET_DEST (set)); dval = make_debug_expr_from_rtl (SET_DEST (set));
/* Emit a debug bind insn before the insn in which /* Emit a debug bind insn before the insn in which
reg dies. */ reg dies. */
bind = gen_rtx_VAR_LOCATION (GET_MODE (SET_DEST (set)), bind_var_loc =
DEBUG_EXPR_TREE_DECL (dval), gen_rtx_VAR_LOCATION (GET_MODE (SET_DEST (set)),
SET_SRC (set), DEBUG_EXPR_TREE_DECL (dval),
VAR_INIT_STATUS_INITIALIZED); SET_SRC (set),
count_reg_usage (bind, counts + nreg, NULL_RTX, 1); VAR_INIT_STATUS_INITIALIZED);
count_reg_usage (bind_var_loc, counts + nreg, NULL_RTX, 1);
bind = emit_debug_insn_before (bind, insn); bind = emit_debug_insn_before (bind_var_loc, insn);
df_insn_rescan (bind); df_insn_rescan (bind);
if (replacements == NULL) if (replacements == NULL)

View File

@ -1984,7 +1984,7 @@ df_bb_regno_last_def_find (basic_block bb, unsigned int regno)
DF is the dataflow object. */ DF is the dataflow object. */
df_ref df_ref
df_find_def (rtx insn, rtx reg) df_find_def (rtx_insn *insn, rtx reg)
{ {
df_ref def; df_ref def;
@ -2003,7 +2003,7 @@ df_find_def (rtx insn, rtx reg)
/* Return true if REG is defined in INSN, zero otherwise. */ /* Return true if REG is defined in INSN, zero otherwise. */
bool bool
df_reg_defined (rtx insn, rtx reg) df_reg_defined (rtx_insn *insn, rtx reg)
{ {
return df_find_def (insn, reg) != NULL; return df_find_def (insn, reg) != NULL;
} }
@ -2013,7 +2013,7 @@ df_reg_defined (rtx insn, rtx reg)
DF is the dataflow object. */ DF is the dataflow object. */
df_ref df_ref
df_find_use (rtx insn, rtx reg) df_find_use (rtx_insn *insn, rtx reg)
{ {
df_ref use; df_ref use;
@ -2036,7 +2036,7 @@ df_find_use (rtx insn, rtx reg)
/* Return true if REG is referenced in INSN, zero otherwise. */ /* Return true if REG is referenced in INSN, zero otherwise. */
bool bool
df_reg_used (rtx insn, rtx reg) df_reg_used (rtx_insn *insn, rtx reg)
{ {
return df_find_use (insn, reg) != NULL; return df_find_use (insn, reg) != NULL;
} }
@ -2262,7 +2262,7 @@ df_dump_bottom (basic_block bb, FILE *file)
/* Dump information about INSN just before or after dumping INSN itself. */ /* Dump information about INSN just before or after dumping INSN itself. */
static void static void
df_dump_insn_problem_data (const_rtx insn, FILE *file, bool top) df_dump_insn_problem_data (const rtx_insn *insn, FILE *file, bool top)
{ {
int i; int i;
@ -2290,7 +2290,7 @@ df_dump_insn_problem_data (const_rtx insn, FILE *file, bool top)
/* Dump information about INSN before dumping INSN itself. */ /* Dump information about INSN before dumping INSN itself. */
void void
df_dump_insn_top (const_rtx insn, FILE *file) df_dump_insn_top (const rtx_insn *insn, FILE *file)
{ {
df_dump_insn_problem_data (insn, file, /*top=*/true); df_dump_insn_problem_data (insn, file, /*top=*/true);
} }
@ -2298,7 +2298,7 @@ df_dump_insn_top (const_rtx insn, FILE *file)
/* Dump information about INSN after dumping INSN itself. */ /* Dump information about INSN after dumping INSN itself. */
void void
df_dump_insn_bottom (const_rtx insn, FILE *file) df_dump_insn_bottom (const rtx_insn *insn, FILE *file)
{ {
df_dump_insn_problem_data (insn, file, /*top=*/false); df_dump_insn_problem_data (insn, file, /*top=*/false);
} }
@ -2389,13 +2389,13 @@ df_insn_uid_debug (unsigned int uid,
DEBUG_FUNCTION void DEBUG_FUNCTION void
df_insn_debug (rtx insn, bool follow_chain, FILE *file) df_insn_debug (rtx_insn *insn, bool follow_chain, FILE *file)
{ {
df_insn_uid_debug (INSN_UID (insn), follow_chain, file); df_insn_uid_debug (INSN_UID (insn), follow_chain, file);
} }
DEBUG_FUNCTION void DEBUG_FUNCTION void
df_insn_debug_regno (rtx insn, FILE *file) df_insn_debug_regno (rtx_insn *insn, FILE *file)
{ {
struct df_insn_info *insn_info = DF_INSN_INFO_GET (insn); struct df_insn_info *insn_info = DF_INSN_INFO_GET (insn);
@ -2454,7 +2454,7 @@ df_ref_debug (df_ref ref, FILE *file)
/* Functions for debugging from GDB. */ /* Functions for debugging from GDB. */
DEBUG_FUNCTION void DEBUG_FUNCTION void
debug_df_insn (rtx insn) debug_df_insn (rtx_insn *insn)
{ {
df_insn_debug (insn, true, stderr); df_insn_debug (insn, true, stderr);
debug_rtx (insn); debug_rtx (insn);
@ -2502,9 +2502,3 @@ debug_df_chain (struct df_link *link)
df_chain_dump (link, stderr); df_chain_dump (link, stderr);
fputc ('\n', stderr); fputc ('\n', stderr);
} }
rtx_insn *DF_REF_INSN (df_ref ref)
{
rtx insn = ref->base.insn_info->insn;
return safe_as_a <rtx_insn *> (insn);
}

View File

@ -262,7 +262,7 @@ df_rd_simulate_artificial_defs_at_top (basic_block bb, bitmap local_rd)
LOCAL_RD. */ LOCAL_RD. */
void void
df_rd_simulate_one_insn (basic_block bb ATTRIBUTE_UNUSED, rtx insn, df_rd_simulate_one_insn (basic_block bb ATTRIBUTE_UNUSED, rtx_insn *insn,
bitmap local_rd) bitmap local_rd)
{ {
df_ref def; df_ref def;
@ -2198,7 +2198,7 @@ df_chain_bottom_dump (basic_block bb, FILE *file)
} }
static void static void
df_chain_insn_top_dump (const_rtx insn, FILE *file) df_chain_insn_top_dump (const rtx_insn *insn, FILE *file)
{ {
if (df_chain_problem_p (DF_UD_CHAIN) && INSN_P (insn)) if (df_chain_problem_p (DF_UD_CHAIN) && INSN_P (insn))
{ {
@ -2229,7 +2229,7 @@ df_chain_insn_top_dump (const_rtx insn, FILE *file)
} }
static void static void
df_chain_insn_bottom_dump (const_rtx insn, FILE *file) df_chain_insn_bottom_dump (const rtx_insn *insn, FILE *file)
{ {
if (df_chain_problem_p (DF_DU_CHAIN) && INSN_P (insn)) if (df_chain_problem_p (DF_DU_CHAIN) && INSN_P (insn))
{ {
@ -2668,7 +2668,7 @@ df_word_lr_add_problem (void)
an insn. */ an insn. */
bool bool
df_word_lr_simulate_defs (rtx insn, bitmap live) df_word_lr_simulate_defs (rtx_insn *insn, bitmap live)
{ {
bool changed = false; bool changed = false;
df_ref def; df_ref def;
@ -2685,7 +2685,7 @@ df_word_lr_simulate_defs (rtx insn, bitmap live)
/* Simulate the effects of the uses of INSN on LIVE. */ /* Simulate the effects of the uses of INSN on LIVE. */
void void
df_word_lr_simulate_uses (rtx insn, bitmap live) df_word_lr_simulate_uses (rtx_insn *insn, bitmap live)
{ {
df_ref use; df_ref use;
@ -2705,7 +2705,7 @@ df_note_alloc (bitmap all_blocks ATTRIBUTE_UNUSED)
/* This is only used if REG_DEAD_DEBUGGING is in effect. */ /* This is only used if REG_DEAD_DEBUGGING is in effect. */
static void static void
df_print_note (const char *prefix, rtx insn, rtx note) df_print_note (const char *prefix, rtx_insn *insn, rtx note)
{ {
if (dump_file) if (dump_file)
{ {
@ -2739,7 +2739,7 @@ df_ignore_stack_reg (int regno ATTRIBUTE_UNUSED)
/* Remove all of the REG_DEAD or REG_UNUSED notes from INSN. */ /* Remove all of the REG_DEAD or REG_UNUSED notes from INSN. */
static void static void
df_remove_dead_and_unused_notes (rtx insn) df_remove_dead_and_unused_notes (rtx_insn *insn)
{ {
rtx *pprev = &REG_NOTES (insn); rtx *pprev = &REG_NOTES (insn);
rtx link = *pprev; rtx link = *pprev;
@ -2895,7 +2895,7 @@ df_whole_mw_reg_unused_p (struct df_mw_hardreg *mws,
*/ */
static void static void
df_set_unused_notes_for_mw (rtx insn, struct df_mw_hardreg *mws, df_set_unused_notes_for_mw (rtx_insn *insn, struct df_mw_hardreg *mws,
bitmap live, bitmap do_not_gen, bitmap live, bitmap do_not_gen,
bitmap artificial_uses, bitmap artificial_uses,
struct dead_debug_local *debug) struct dead_debug_local *debug)
@ -2968,7 +2968,7 @@ df_whole_mw_reg_dead_p (struct df_mw_hardreg *mws,
register. */ register. */
static void static void
df_set_dead_notes_for_mw (rtx insn, struct df_mw_hardreg *mws, df_set_dead_notes_for_mw (rtx_insn *insn, struct df_mw_hardreg *mws,
bitmap live, bitmap do_not_gen, bitmap live, bitmap do_not_gen,
bitmap artificial_uses, bool *added_notes_p) bitmap artificial_uses, bool *added_notes_p)
{ {
@ -3025,7 +3025,7 @@ df_set_dead_notes_for_mw (rtx insn, struct df_mw_hardreg *mws,
LIVE. Do not generate notes for registers in ARTIFICIAL_USES. */ LIVE. Do not generate notes for registers in ARTIFICIAL_USES. */
static void static void
df_create_unused_note (rtx insn, df_ref def, df_create_unused_note (rtx_insn *insn, df_ref def,
bitmap live, bitmap artificial_uses, bitmap live, bitmap artificial_uses,
struct dead_debug_local *debug) struct dead_debug_local *debug)
{ {
@ -3357,7 +3357,7 @@ df_note_add_problem (void)
/* Find the set of DEFs for INSN. */ /* Find the set of DEFs for INSN. */
void void
df_simulate_find_defs (rtx insn, bitmap defs) df_simulate_find_defs (rtx_insn *insn, bitmap defs)
{ {
df_ref def; df_ref def;
@ -3368,7 +3368,7 @@ df_simulate_find_defs (rtx insn, bitmap defs)
/* Find the set of uses for INSN. This includes partial defs. */ /* Find the set of uses for INSN. This includes partial defs. */
static void static void
df_simulate_find_uses (rtx insn, bitmap uses) df_simulate_find_uses (rtx_insn *insn, bitmap uses)
{ {
df_ref def, use; df_ref def, use;
struct df_insn_info *insn_info = DF_INSN_INFO_GET (insn); struct df_insn_info *insn_info = DF_INSN_INFO_GET (insn);
@ -3383,7 +3383,7 @@ df_simulate_find_uses (rtx insn, bitmap uses)
/* Find the set of real DEFs, which are not clobbers, for INSN. */ /* Find the set of real DEFs, which are not clobbers, for INSN. */
void void
df_simulate_find_noclobber_defs (rtx insn, bitmap defs) df_simulate_find_noclobber_defs (rtx_insn *insn, bitmap defs)
{ {
df_ref def; df_ref def;
@ -3396,7 +3396,7 @@ df_simulate_find_noclobber_defs (rtx insn, bitmap defs)
/* Simulate the effects of the defs of INSN on LIVE. */ /* Simulate the effects of the defs of INSN on LIVE. */
void void
df_simulate_defs (rtx insn, bitmap live) df_simulate_defs (rtx_insn *insn, bitmap live)
{ {
df_ref def; df_ref def;
@ -3415,7 +3415,7 @@ df_simulate_defs (rtx insn, bitmap live)
/* Simulate the effects of the uses of INSN on LIVE. */ /* Simulate the effects of the uses of INSN on LIVE. */
void void
df_simulate_uses (rtx insn, bitmap live) df_simulate_uses (rtx_insn *insn, bitmap live)
{ {
df_ref use; df_ref use;
@ -3476,7 +3476,7 @@ df_simulate_initialize_backwards (basic_block bb, bitmap live)
/* Simulate the backwards effects of INSN on the bitmap LIVE. */ /* Simulate the backwards effects of INSN on the bitmap LIVE. */
void void
df_simulate_one_insn_backwards (basic_block bb, rtx insn, bitmap live) df_simulate_one_insn_backwards (basic_block bb, rtx_insn *insn, bitmap live)
{ {
if (!NONDEBUG_INSN_P (insn)) if (!NONDEBUG_INSN_P (insn))
return; return;
@ -3539,7 +3539,7 @@ df_simulate_initialize_forwards (basic_block bb, bitmap live)
/* Simulate the forwards effects of INSN on the bitmap LIVE. */ /* Simulate the forwards effects of INSN on the bitmap LIVE. */
void void
df_simulate_one_insn_forwards (basic_block bb, rtx insn, bitmap live) df_simulate_one_insn_forwards (basic_block bb, rtx_insn *insn, bitmap live)
{ {
rtx link; rtx link;
if (! INSN_P (insn)) if (! INSN_P (insn))
@ -4051,7 +4051,7 @@ df_md_simulate_artificial_defs_at_top (basic_block bb, bitmap local_md)
LOCAL_MD. */ LOCAL_MD. */
void void
df_md_simulate_one_insn (basic_block bb ATTRIBUTE_UNUSED, rtx insn, df_md_simulate_one_insn (basic_block bb ATTRIBUTE_UNUSED, rtx_insn *insn,
bitmap local_md) bitmap local_md)
{ {
df_ref def; df_ref def;

View File

@ -109,9 +109,10 @@ static void df_ref_chain_delete_du_chain (df_ref);
static void df_ref_chain_delete (df_ref); static void df_ref_chain_delete (df_ref);
static void df_refs_add_to_chains (struct df_collection_rec *, static void df_refs_add_to_chains (struct df_collection_rec *,
basic_block, rtx, unsigned int); basic_block, rtx_insn *, unsigned int);
static bool df_insn_refs_verify (struct df_collection_rec *, basic_block, rtx, bool); static bool df_insn_refs_verify (struct df_collection_rec *, basic_block,
rtx_insn *, bool);
static void df_entry_block_defs_collect (struct df_collection_rec *, bitmap); static void df_entry_block_defs_collect (struct df_collection_rec *, bitmap);
static void df_exit_block_uses_collect (struct df_collection_rec *, bitmap); static void df_exit_block_uses_collect (struct df_collection_rec *, bitmap);
static void df_install_ref (df_ref, struct df_reg_info *, static void df_install_ref (df_ref, struct df_reg_info *,
@ -626,7 +627,7 @@ df_scan_blocks (void)
depending on whether LOC is inside PATTERN (INSN) or a note. */ depending on whether LOC is inside PATTERN (INSN) or a note. */
void void
df_uses_create (rtx *loc, rtx insn, int ref_flags) df_uses_create (rtx *loc, rtx_insn *insn, int ref_flags)
{ {
gcc_assert (!(ref_flags & ~DF_REF_IN_NOTE)); gcc_assert (!(ref_flags & ~DF_REF_IN_NOTE));
df_uses_record (NULL, loc, DF_REF_REG_USE, df_uses_record (NULL, loc, DF_REF_REG_USE,
@ -833,7 +834,7 @@ df_reg_chain_unlink (df_ref ref)
out. */ out. */
struct df_insn_info * struct df_insn_info *
df_insn_create_insn_record (rtx insn) df_insn_create_insn_record (rtx_insn *insn)
{ {
struct df_scan_problem_data *problem_data struct df_scan_problem_data *problem_data
= (struct df_scan_problem_data *) df_scan->problem_data; = (struct df_scan_problem_data *) df_scan->problem_data;
@ -941,7 +942,7 @@ df_insn_info_delete (unsigned int uid)
or marked for later in deferred mode. */ or marked for later in deferred mode. */
void void
df_insn_delete (rtx insn) df_insn_delete (rtx_insn *insn)
{ {
unsigned int uid; unsigned int uid;
basic_block bb; basic_block bb;
@ -1027,7 +1028,7 @@ df_free_collection_rec (struct df_collection_rec *collection_rec)
/* Rescan INSN. Return TRUE if the rescanning produced any changes. */ /* Rescan INSN. Return TRUE if the rescanning produced any changes. */
bool bool
df_insn_rescan (rtx insn) df_insn_rescan (rtx_insn *insn)
{ {
unsigned int uid = INSN_UID (insn); unsigned int uid = INSN_UID (insn);
struct df_insn_info *insn_info = NULL; struct df_insn_info *insn_info = NULL;
@ -1117,7 +1118,7 @@ df_insn_rescan (rtx insn)
dirty. */ dirty. */
bool bool
df_insn_rescan_debug_internal (rtx insn) df_insn_rescan_debug_internal (rtx_insn *insn)
{ {
unsigned int uid = INSN_UID (insn); unsigned int uid = INSN_UID (insn);
struct df_insn_info *insn_info; struct df_insn_info *insn_info;
@ -1763,7 +1764,7 @@ df_maybe_reorganize_def_refs (enum df_ref_order order)
instructions from one block to another. */ instructions from one block to another. */
void void
df_insn_change_bb (rtx insn, basic_block new_bb) df_insn_change_bb (rtx_insn *insn, basic_block new_bb)
{ {
basic_block old_bb = BLOCK_FOR_INSN (insn); basic_block old_bb = BLOCK_FOR_INSN (insn);
struct df_insn_info *insn_info; struct df_insn_info *insn_info;
@ -1944,7 +1945,7 @@ df_mw_hardreg_chain_delete_eq_uses (struct df_insn_info *insn_info)
/* Rescan only the REG_EQUIV/REG_EQUAL notes part of INSN. */ /* Rescan only the REG_EQUIV/REG_EQUAL notes part of INSN. */
void void
df_notes_rescan (rtx insn) df_notes_rescan (rtx_insn *insn)
{ {
struct df_insn_info *insn_info; struct df_insn_info *insn_info;
unsigned int uid = INSN_UID (insn); unsigned int uid = INSN_UID (insn);
@ -2434,7 +2435,7 @@ df_install_mws (const vec<df_mw_hardreg_ptr, va_heap> *old_vec)
static void static void
df_refs_add_to_chains (struct df_collection_rec *collection_rec, df_refs_add_to_chains (struct df_collection_rec *collection_rec,
basic_block bb, rtx insn, unsigned int flags) basic_block bb, rtx_insn *insn, unsigned int flags)
{ {
if (insn) if (insn)
{ {
@ -4135,7 +4136,7 @@ df_mws_verify (const vec<df_mw_hardreg_ptr, va_heap> *new_rec,
static bool static bool
df_insn_refs_verify (struct df_collection_rec *collection_rec, df_insn_refs_verify (struct df_collection_rec *collection_rec,
basic_block bb, basic_block bb,
rtx insn, rtx_insn *insn,
bool abort_if_fail) bool abort_if_fail)
{ {
bool ret1, ret2, ret3, ret4; bool ret1, ret2, ret3, ret4;

View File

@ -239,7 +239,7 @@ typedef void (*df_dump_problem_function) (FILE *);
typedef void (*df_dump_bb_problem_function) (basic_block, FILE *); typedef void (*df_dump_bb_problem_function) (basic_block, FILE *);
/* Function to dump before or after an insn to FILE. */ /* Function to dump before or after an insn to FILE. */
typedef void (*df_dump_insn_problem_function) (const_rtx, FILE *); typedef void (*df_dump_insn_problem_function) (const rtx_insn *, FILE *);
/* Function to dump top or bottom of basic block results to FILE. */ /* Function to dump top or bottom of basic block results to FILE. */
typedef void (*df_verify_solution_start) (void); typedef void (*df_verify_solution_start) (void);
@ -421,7 +421,7 @@ typedef union df_ref_d *df_ref;
/* One of these structures is allocated for every insn. */ /* One of these structures is allocated for every insn. */
struct df_insn_info struct df_insn_info
{ {
rtx insn; /* The insn this info comes from. */ rtx_insn *insn; /* The insn this info comes from. */
df_ref defs; /* Head of insn-def chain. */ df_ref defs; /* Head of insn-def chain. */
df_ref uses; /* Head of insn-use chain. */ df_ref uses; /* Head of insn-use chain. */
/* Head of insn-use chain for uses in REG_EQUAL/EQUIV notes. */ /* Head of insn-use chain for uses in REG_EQUAL/EQUIV notes. */
@ -649,7 +649,7 @@ struct df_d
: BLOCK_FOR_INSN (DF_REF_INSN (REF))) : BLOCK_FOR_INSN (DF_REF_INSN (REF)))
#define DF_REF_BBNO(REF) (DF_REF_BB (REF)->index) #define DF_REF_BBNO(REF) (DF_REF_BB (REF)->index)
#define DF_REF_INSN_INFO(REF) ((REF)->base.insn_info) #define DF_REF_INSN_INFO(REF) ((REF)->base.insn_info)
extern rtx_insn *DF_REF_INSN (df_ref ref); #define DF_REF_INSN(REF) ((REF)->base.insn_info->insn)
#define DF_REF_INSN_UID(REF) (INSN_UID (DF_REF_INSN(REF))) #define DF_REF_INSN_UID(REF) (INSN_UID (DF_REF_INSN(REF)))
#define DF_REF_CLASS(REF) ((REF)->base.cl) #define DF_REF_CLASS(REF) ((REF)->base.cl)
#define DF_REF_TYPE(REF) ((REF)->base.type) #define DF_REF_TYPE(REF) ((REF)->base.type)
@ -953,10 +953,10 @@ extern void df_check_cfg_clean (void);
#endif #endif
extern df_ref df_bb_regno_first_def_find (basic_block, unsigned int); extern df_ref df_bb_regno_first_def_find (basic_block, unsigned int);
extern df_ref df_bb_regno_last_def_find (basic_block, unsigned int); extern df_ref df_bb_regno_last_def_find (basic_block, unsigned int);
extern df_ref df_find_def (rtx, rtx); extern df_ref df_find_def (rtx_insn *, rtx);
extern bool df_reg_defined (rtx, rtx); extern bool df_reg_defined (rtx_insn *, rtx);
extern df_ref df_find_use (rtx, rtx); extern df_ref df_find_use (rtx_insn *, rtx);
extern bool df_reg_used (rtx, rtx); extern bool df_reg_used (rtx_insn *, rtx);
extern void df_worklist_dataflow (struct dataflow *,bitmap, int *, int); extern void df_worklist_dataflow (struct dataflow *,bitmap, int *, int);
extern void df_print_regset (FILE *file, bitmap r); extern void df_print_regset (FILE *file, bitmap r);
extern void df_print_word_regset (FILE *file, bitmap r); extern void df_print_word_regset (FILE *file, bitmap r);
@ -965,15 +965,15 @@ extern void df_dump_region (FILE *);
extern void df_dump_start (FILE *); extern void df_dump_start (FILE *);
extern void df_dump_top (basic_block, FILE *); extern void df_dump_top (basic_block, FILE *);
extern void df_dump_bottom (basic_block, FILE *); extern void df_dump_bottom (basic_block, FILE *);
extern void df_dump_insn_top (const_rtx, FILE *); extern void df_dump_insn_top (const rtx_insn *, FILE *);
extern void df_dump_insn_bottom (const_rtx, FILE *); extern void df_dump_insn_bottom (const rtx_insn *, FILE *);
extern void df_refs_chain_dump (df_ref, bool, FILE *); extern void df_refs_chain_dump (df_ref, bool, FILE *);
extern void df_regs_chain_dump (df_ref, FILE *); extern void df_regs_chain_dump (df_ref, FILE *);
extern void df_insn_debug (rtx, bool, FILE *); extern void df_insn_debug (rtx_insn *, bool, FILE *);
extern void df_insn_debug_regno (rtx, FILE *); extern void df_insn_debug_regno (rtx_insn *, FILE *);
extern void df_regno_debug (unsigned int, FILE *); extern void df_regno_debug (unsigned int, FILE *);
extern void df_ref_debug (df_ref, FILE *); extern void df_ref_debug (df_ref, FILE *);
extern void debug_df_insn (rtx); extern void debug_df_insn (rtx_insn *);
extern void debug_df_regno (unsigned int); extern void debug_df_regno (unsigned int);
extern void debug_df_reg (rtx); extern void debug_df_reg (rtx);
extern void debug_df_defno (unsigned int); extern void debug_df_defno (unsigned int);
@ -991,7 +991,7 @@ extern void df_chain_dump (struct df_link *, FILE *);
extern void df_print_bb_index (basic_block bb, FILE *file); extern void df_print_bb_index (basic_block bb, FILE *file);
extern void df_rd_add_problem (void); extern void df_rd_add_problem (void);
extern void df_rd_simulate_artificial_defs_at_top (basic_block, bitmap); extern void df_rd_simulate_artificial_defs_at_top (basic_block, bitmap);
extern void df_rd_simulate_one_insn (basic_block, rtx, bitmap); extern void df_rd_simulate_one_insn (basic_block, rtx_insn *, bitmap);
extern void df_lr_add_problem (void); extern void df_lr_add_problem (void);
extern void df_lr_verify_transfer_functions (void); extern void df_lr_verify_transfer_functions (void);
extern void df_live_verify_transfer_functions (void); extern void df_live_verify_transfer_functions (void);
@ -1000,23 +1000,23 @@ extern void df_live_set_all_dirty (void);
extern void df_chain_add_problem (unsigned int); extern void df_chain_add_problem (unsigned int);
extern void df_word_lr_add_problem (void); extern void df_word_lr_add_problem (void);
extern bool df_word_lr_mark_ref (df_ref, bool, bitmap); extern bool df_word_lr_mark_ref (df_ref, bool, bitmap);
extern bool df_word_lr_simulate_defs (rtx, bitmap); extern bool df_word_lr_simulate_defs (rtx_insn *, bitmap);
extern void df_word_lr_simulate_uses (rtx, bitmap); extern void df_word_lr_simulate_uses (rtx_insn *, bitmap);
extern void df_word_lr_simulate_artificial_refs_at_top (basic_block, bitmap); extern void df_word_lr_simulate_artificial_refs_at_top (basic_block, bitmap);
extern void df_word_lr_simulate_artificial_refs_at_end (basic_block, bitmap); extern void df_word_lr_simulate_artificial_refs_at_end (basic_block, bitmap);
extern void df_note_add_problem (void); extern void df_note_add_problem (void);
extern void df_md_add_problem (void); extern void df_md_add_problem (void);
extern void df_md_simulate_artificial_defs_at_top (basic_block, bitmap); extern void df_md_simulate_artificial_defs_at_top (basic_block, bitmap);
extern void df_md_simulate_one_insn (basic_block, rtx, bitmap); extern void df_md_simulate_one_insn (basic_block, rtx_insn *, bitmap);
extern void df_simulate_find_noclobber_defs (rtx, bitmap); extern void df_simulate_find_noclobber_defs (rtx_insn *, bitmap);
extern void df_simulate_find_defs (rtx, bitmap); extern void df_simulate_find_defs (rtx_insn *, bitmap);
extern void df_simulate_defs (rtx, bitmap); extern void df_simulate_defs (rtx_insn *, bitmap);
extern void df_simulate_uses (rtx, bitmap); extern void df_simulate_uses (rtx_insn *, bitmap);
extern void df_simulate_initialize_backwards (basic_block, bitmap); extern void df_simulate_initialize_backwards (basic_block, bitmap);
extern void df_simulate_one_insn_backwards (basic_block, rtx, bitmap); extern void df_simulate_one_insn_backwards (basic_block, rtx_insn *, bitmap);
extern void df_simulate_finalize_backwards (basic_block, bitmap); extern void df_simulate_finalize_backwards (basic_block, bitmap);
extern void df_simulate_initialize_forwards (basic_block, bitmap); extern void df_simulate_initialize_forwards (basic_block, bitmap);
extern void df_simulate_one_insn_forwards (basic_block, rtx, bitmap); extern void df_simulate_one_insn_forwards (basic_block, rtx_insn *, bitmap);
extern void simulate_backwards_to_point (basic_block, regset, rtx); extern void simulate_backwards_to_point (basic_block, regset, rtx);
extern bool can_move_insns_across (rtx_insn *, rtx_insn *, extern bool can_move_insns_across (rtx_insn *, rtx_insn *,
rtx_insn *, rtx_insn *, rtx_insn *, rtx_insn *,
@ -1029,20 +1029,20 @@ extern void df_scan_add_problem (void);
extern void df_grow_reg_info (void); extern void df_grow_reg_info (void);
extern void df_grow_insn_info (void); extern void df_grow_insn_info (void);
extern void df_scan_blocks (void); extern void df_scan_blocks (void);
extern void df_uses_create (rtx *, rtx, int); extern void df_uses_create (rtx *, rtx_insn *, int);
extern struct df_insn_info * df_insn_create_insn_record (rtx); extern struct df_insn_info * df_insn_create_insn_record (rtx_insn *);
extern void df_insn_delete (rtx); extern void df_insn_delete (rtx_insn *);
extern void df_bb_refs_record (int, bool); extern void df_bb_refs_record (int, bool);
extern bool df_insn_rescan (rtx); extern bool df_insn_rescan (rtx_insn *);
extern bool df_insn_rescan_debug_internal (rtx); extern bool df_insn_rescan_debug_internal (rtx_insn *);
extern void df_insn_rescan_all (void); extern void df_insn_rescan_all (void);
extern void df_process_deferred_rescans (void); extern void df_process_deferred_rescans (void);
extern void df_recompute_luids (basic_block); extern void df_recompute_luids (basic_block);
extern void df_insn_change_bb (rtx, basic_block); extern void df_insn_change_bb (rtx_insn *, basic_block);
extern void df_maybe_reorganize_use_refs (enum df_ref_order); extern void df_maybe_reorganize_use_refs (enum df_ref_order);
extern void df_maybe_reorganize_def_refs (enum df_ref_order); extern void df_maybe_reorganize_def_refs (enum df_ref_order);
extern void df_ref_change_reg_with_loc (int, int, rtx); extern void df_ref_change_reg_with_loc (int, int, rtx);
extern void df_notes_rescan (rtx); extern void df_notes_rescan (rtx_insn *);
extern void df_hard_reg_init (void); extern void df_hard_reg_init (void);
extern void df_update_entry_block_defs (void); extern void df_update_entry_block_defs (void);
extern void df_update_exit_block_uses (void); extern void df_update_exit_block_uses (void);

View File

@ -4043,7 +4043,7 @@ void
set_insn_deleted (rtx insn) set_insn_deleted (rtx insn)
{ {
if (INSN_P (insn)) if (INSN_P (insn))
df_insn_delete (insn); df_insn_delete (as_a <rtx_insn *> (insn));
PUT_CODE (insn, NOTE); PUT_CODE (insn, NOTE);
NOTE_KIND (insn) = NOTE_INSN_DELETED; NOTE_KIND (insn) = NOTE_INSN_DELETED;
} }
@ -4227,7 +4227,7 @@ reorder_insns (rtx_insn *from, rtx_insn *to, rtx_insn *after)
if (!BARRIER_P (after) if (!BARRIER_P (after)
&& (bb = BLOCK_FOR_INSN (after))) && (bb = BLOCK_FOR_INSN (after)))
{ {
rtx x; rtx_insn *x;
df_set_bb_dirty (bb); df_set_bb_dirty (bb);
if (!BARRIER_P (from) if (!BARRIER_P (from)
@ -5184,7 +5184,7 @@ set_unique_reg_note (rtx insn, enum reg_note kind, rtx datum)
{ {
case REG_EQUAL: case REG_EQUAL:
case REG_EQUIV: case REG_EQUIV:
df_notes_rescan (insn); df_notes_rescan (as_a <rtx_insn *> (insn));
break; break;
default: default:
break; break;

View File

@ -3106,7 +3106,7 @@ cleanup_subreg_operands (rtx insn)
*recog_data.dup_loc[i] = walk_alter_subreg (recog_data.dup_loc[i], &changed); *recog_data.dup_loc[i] = walk_alter_subreg (recog_data.dup_loc[i], &changed);
} }
if (changed) if (changed)
df_insn_rescan (insn); df_insn_rescan (as_a <rtx_insn *> (insn));
} }
/* If X is a SUBREG, try to replace it with a REG or a MEM, based on /* If X is a SUBREG, try to replace it with a REG or a MEM, based on

View File

@ -4092,7 +4092,7 @@ update_ld_motion_stores (struct expr * expr)
for ( ; list != NULL_RTX; list = XEXP (list, 1)) for ( ; list != NULL_RTX; list = XEXP (list, 1))
{ {
rtx insn = XEXP (list, 0); rtx_insn *insn = as_a <rtx_insn *> (XEXP (list, 0));
rtx pat = PATTERN (insn); rtx pat = PATTERN (insn);
rtx src = SET_SRC (pat); rtx src = SET_SRC (pat);
rtx reg = expr->reaching_reg; rtx reg = expr->reaching_reg;

View File

@ -5223,9 +5223,10 @@ debug_ready_list (struct ready_list *ready)
NOTEs. This is used for NOTE_INSN_EPILOGUE_BEG, so that sched-ebb NOTEs. This is used for NOTE_INSN_EPILOGUE_BEG, so that sched-ebb
replaces the epilogue note in the correct basic block. */ replaces the epilogue note in the correct basic block. */
void void
reemit_notes (rtx insn) reemit_notes (rtx_insn *insn)
{ {
rtx note, last = insn; rtx note;
rtx_insn *last = insn;
for (note = REG_NOTES (insn); note; note = XEXP (note, 1)) for (note = REG_NOTES (insn); note; note = XEXP (note, 1))
{ {

View File

@ -301,6 +301,15 @@ change_regs (rtx *loc)
return result; return result;
} }
static bool
change_regs_in_insn (rtx_insn **insn_ptr)
{
rtx rtx = *insn_ptr;
bool result = change_regs (&rtx);
*insn_ptr = as_a <rtx_insn *> (rtx);
return result;
}
/* Attach MOVE to the edge E. The move is attached to the head of the /* Attach MOVE to the edge E. The move is attached to the head of the
list if HEAD_P is TRUE. */ list if HEAD_P is TRUE. */
static void static void
@ -557,7 +566,8 @@ change_loop (ira_loop_tree_node_t node)
int regno; int regno;
bool used_p; bool used_p;
ira_allocno_t allocno, parent_allocno, *map; ira_allocno_t allocno, parent_allocno, *map;
rtx insn, original_reg; rtx_insn *insn;
rtx original_reg;
enum reg_class aclass, pclass; enum reg_class aclass, pclass;
ira_loop_tree_node_t parent; ira_loop_tree_node_t parent;
@ -568,7 +578,7 @@ change_loop (ira_loop_tree_node_t node)
if (node->bb != NULL) if (node->bb != NULL)
{ {
FOR_BB_INSNS (node->bb, insn) FOR_BB_INSNS (node->bb, insn)
if (INSN_P (insn) && change_regs (&insn)) if (INSN_P (insn) && change_regs_in_insn (&insn))
{ {
df_insn_rescan (insn); df_insn_rescan (insn);
df_notes_rescan (insn); df_notes_rescan (insn);

View File

@ -3319,7 +3319,7 @@ static int recorded_label_ref;
static int static int
update_equiv_regs (void) update_equiv_regs (void)
{ {
rtx insn; rtx_insn *insn;
basic_block bb; basic_block bb;
int loop_depth; int loop_depth;
bitmap cleared_regs; bitmap cleared_regs;
@ -3345,7 +3345,8 @@ update_equiv_regs (void)
FOR_EACH_BB_FN (bb, cfun) FOR_EACH_BB_FN (bb, cfun)
FOR_BB_INSNS (bb, insn) FOR_BB_INSNS (bb, insn)
if (NONDEBUG_INSN_P (insn)) if (NONDEBUG_INSN_P (insn))
for_each_rtx (&insn, set_paradoxical_subreg, (void *) pdx_subregs); for_each_rtx_in_insn (&insn, set_paradoxical_subreg,
(void *) pdx_subregs);
/* Scan the insns and find which registers have equivalences. Do this /* Scan the insns and find which registers have equivalences. Do this
in a separate scan of the insns because (due to -fcse-follow-jumps) in a separate scan of the insns because (due to -fcse-follow-jumps)
@ -3616,7 +3617,8 @@ update_equiv_regs (void)
&& ! contains_replace_regs (XEXP (dest, 0)) && ! contains_replace_regs (XEXP (dest, 0))
&& ! pdx_subregs[regno]) && ! pdx_subregs[regno])
{ {
rtx init_insn = XEXP (reg_equiv[regno].init_insns, 0); rtx_insn *init_insn =
as_a <rtx_insn *> (XEXP (reg_equiv[regno].init_insns, 0));
if (validate_equiv_mem (init_insn, src, dest) if (validate_equiv_mem (init_insn, src, dest)
&& ! memref_used_between_p (dest, init_insn, insn) && ! memref_used_between_p (dest, init_insn, insn)
/* Attaching a REG_EQUIV note will fail if INIT_INSN has /* Attaching a REG_EQUIV note will fail if INIT_INSN has
@ -3737,7 +3739,7 @@ update_equiv_regs (void)
INSN. Update the flow information. */ INSN. Update the flow information. */
else if (prev_nondebug_insn (insn) != equiv_insn) else if (prev_nondebug_insn (insn) != equiv_insn)
{ {
rtx new_insn; rtx_insn *new_insn;
new_insn = emit_insn_before (PATTERN (equiv_insn), insn); new_insn = emit_insn_before (PATTERN (equiv_insn), insn);
REG_NOTES (new_insn) = REG_NOTES (equiv_insn); REG_NOTES (new_insn) = REG_NOTES (equiv_insn);

View File

@ -500,13 +500,13 @@ confirm_change_group (void)
if (object) if (object)
{ {
if (object != last_object && last_object && INSN_P (last_object)) if (object != last_object && last_object && INSN_P (last_object))
df_insn_rescan (last_object); df_insn_rescan (as_a <rtx_insn *> (last_object));
last_object = object; last_object = object;
} }
} }
if (last_object && INSN_P (last_object)) if (last_object && INSN_P (last_object))
df_insn_rescan (last_object); df_insn_rescan (as_a <rtx_insn *> (last_object));
num_changes = 0; num_changes = 0;
} }
@ -3396,7 +3396,7 @@ static void
peep2_update_life (basic_block bb, int match_len, rtx last, rtx prev) peep2_update_life (basic_block bb, int match_len, rtx last, rtx prev)
{ {
int i = peep2_buf_position (peep2_current + match_len + 1); int i = peep2_buf_position (peep2_current + match_len + 1);
rtx x; rtx_insn *x;
regset_head live; regset_head live;
INIT_REG_SET (&live); INIT_REG_SET (&live);
@ -3405,7 +3405,7 @@ peep2_update_life (basic_block bb, int match_len, rtx last, rtx prev)
gcc_assert (peep2_current_count >= match_len + 1); gcc_assert (peep2_current_count >= match_len + 1);
peep2_current_count -= match_len + 1; peep2_current_count -= match_len + 1;
x = last; x = as_a <rtx_insn *> (last);
do do
{ {
if (INSN_P (x)) if (INSN_P (x))
@ -3461,7 +3461,7 @@ peep2_fill_buffer (basic_block bb, rtx insn, regset live)
COPY_REG_SET (peep2_insn_data[pos].live_before, live); COPY_REG_SET (peep2_insn_data[pos].live_before, live);
peep2_current_count++; peep2_current_count++;
df_simulate_one_insn_forwards (bb, insn, live); df_simulate_one_insn_forwards (bb, as_a <rtx_insn *> (insn), live);
return true; return true;
} }

View File

@ -3135,7 +3135,7 @@ extern bool validate_subreg (enum machine_mode, enum machine_mode,
/* In combine.c */ /* In combine.c */
extern unsigned int extended_count (const_rtx, enum machine_mode, int); extern unsigned int extended_count (const_rtx, enum machine_mode, int);
extern rtx remove_death (unsigned int, rtx); extern rtx remove_death (unsigned int, rtx_insn *);
extern void dump_combine_stats (FILE *); extern void dump_combine_stats (FILE *);
extern void dump_combine_total_stats (FILE *); extern void dump_combine_total_stats (FILE *);
extern rtx make_compound_operation (rtx, enum rtx_code); extern rtx make_compound_operation (rtx, enum rtx_code);
@ -3199,7 +3199,7 @@ extern HOST_WIDE_INT find_args_size_adjust (rtx);
extern int fixup_args_size_notes (rtx, rtx, int); extern int fixup_args_size_notes (rtx, rtx, int);
/* In cfgrtl.c */ /* In cfgrtl.c */
extern void print_rtl_with_bb (FILE *, const_rtx, int); extern void print_rtl_with_bb (FILE *, const rtx_insn *, int);
extern rtx_insn *duplicate_insn_chain (rtx_insn *, rtx_insn *); extern rtx_insn *duplicate_insn_chain (rtx_insn *, rtx_insn *);
/* In expmed.c */ /* In expmed.c */

View File

@ -2060,7 +2060,7 @@ remove_note (rtx insn, const_rtx note)
{ {
case REG_EQUAL: case REG_EQUAL:
case REG_EQUIV: case REG_EQUIV:
df_notes_rescan (insn); df_notes_rescan (as_a <rtx_insn *> (insn));
break; break;
default: default:
break; break;

View File

@ -134,7 +134,7 @@ extern void sched_insns_finish (void);
extern void *xrecalloc (void *, size_t, size_t, size_t); extern void *xrecalloc (void *, size_t, size_t, size_t);
extern void reemit_notes (rtx); extern void reemit_notes (rtx_insn *);
/* Functions in haifa-sched.c. */ /* Functions in haifa-sched.c. */
extern int haifa_classify_insn (const_rtx); extern int haifa_classify_insn (const_rtx);

View File

@ -177,10 +177,11 @@ propagate_for_debug_subst (rtx from, const_rtx old_rtx, void *data)
of THIS_BASIC_BLOCK. */ of THIS_BASIC_BLOCK. */
void void
propagate_for_debug (rtx insn, rtx last, rtx dest, rtx src, propagate_for_debug (rtx_insn *insn, rtx last, rtx dest, rtx src,
basic_block this_basic_block) basic_block this_basic_block)
{ {
rtx next, loc, end = NEXT_INSN (BB_END (this_basic_block)); rtx_insn *next, *end = NEXT_INSN (BB_END (this_basic_block));
rtx loc;
rtx (*saved_rtl_hook_no_emit) (enum machine_mode, rtx); rtx (*saved_rtl_hook_no_emit) (enum machine_mode, rtx);
struct rtx_subst_pair p; struct rtx_subst_pair p;

View File

@ -149,7 +149,7 @@ extern int dead_debug_insert_temp (struct dead_debug_local *,
unsigned int uregno, rtx insn, unsigned int uregno, rtx insn,
enum debug_temp_where); enum debug_temp_where);
extern void propagate_for_debug (rtx, rtx, rtx, rtx, basic_block); extern void propagate_for_debug (rtx_insn *, rtx, rtx, rtx, basic_block);
#endif /* GCC_VALTRACK_H */ #endif /* GCC_VALTRACK_H */

View File

@ -14,5 +14,4 @@ Phase 6: use extra rtx_def subclasses: TODO
TODO: "Scaffolding" to be removed TODO: "Scaffolding" to be removed
================================= =================================
* DF_REF_INSN
* SET_NEXT_INSN, SET_PREV_INSN * SET_NEXT_INSN, SET_PREV_INSN