summaryrefslogtreecommitdiff
path: root/gcc/df-core.c
diff options
context:
space:
mode:
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-26 20:39:42 +0000
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-26 20:39:42 +0000
commite149ca56a35fdab1b3eaff221bb4640724e505d4 (patch)
treef1f8f5ea645933071854d5a1f896591b6d6c283b /gcc/df-core.c
parent73e15687cef91ebdd3625f49f1777e0a1efb1e93 (diff)
downloadgcc-e149ca56a35fdab1b3eaff221bb4640724e505d4.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214548 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/df-core.c')
-rw-r--r--gcc/df-core.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/gcc/df-core.c b/gcc/df-core.c
index 5c5b1ae2784..4b7d660d90d 100644
--- a/gcc/df-core.c
+++ b/gcc/df-core.c
@@ -1984,7 +1984,7 @@ df_bb_regno_last_def_find (basic_block bb, unsigned int regno)
DF is the dataflow object. */
df_ref
-df_find_def (rtx insn, rtx reg)
+df_find_def (rtx_insn *insn, rtx reg)
{
df_ref def;
@@ -2003,7 +2003,7 @@ df_find_def (rtx insn, rtx reg)
/* Return true if REG is defined in INSN, zero otherwise. */
bool
-df_reg_defined (rtx insn, rtx reg)
+df_reg_defined (rtx_insn *insn, rtx reg)
{
return df_find_def (insn, reg) != NULL;
}
@@ -2013,7 +2013,7 @@ df_reg_defined (rtx insn, rtx reg)
DF is the dataflow object. */
df_ref
-df_find_use (rtx insn, rtx reg)
+df_find_use (rtx_insn *insn, rtx reg)
{
df_ref use;
@@ -2036,7 +2036,7 @@ df_find_use (rtx insn, rtx reg)
/* Return true if REG is referenced in INSN, zero otherwise. */
bool
-df_reg_used (rtx insn, rtx reg)
+df_reg_used (rtx_insn *insn, rtx reg)
{
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. */
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;
@@ -2290,7 +2290,7 @@ df_dump_insn_problem_data (const_rtx insn, FILE *file, bool top)
/* Dump information about INSN before dumping INSN itself. */
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);
}
@@ -2298,7 +2298,7 @@ df_dump_insn_top (const_rtx insn, FILE *file)
/* Dump information about INSN after dumping INSN itself. */
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);
}
@@ -2389,13 +2389,13 @@ df_insn_uid_debug (unsigned int uid,
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);
}
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);
@@ -2454,7 +2454,7 @@ df_ref_debug (df_ref ref, FILE *file)
/* Functions for debugging from GDB. */
DEBUG_FUNCTION void
-debug_df_insn (rtx insn)
+debug_df_insn (rtx_insn *insn)
{
df_insn_debug (insn, true, stderr);
debug_rtx (insn);
@@ -2502,9 +2502,3 @@ debug_df_chain (struct df_link *link)
df_chain_dump (link, 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);
-}