From dd3eed93e9e8da1604b38c895c718c90238cf2c6 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Fri, 22 Aug 2014 14:17:25 +0000 Subject: [PATCH] df-*.c: Use rtx_insn gcc/ * df-core.c (df_bb_regno_first_def_find): Strengthen local "insn" from rtx to rtx_insn *. (df_bb_regno_last_def_find): Likewise. * df-problems.c (df_rd_bb_local_compute): Likewise. (df_lr_bb_local_compute): Likewise. (df_live_bb_local_compute): Likewise. (df_chain_remove_problem): Likewise. (df_chain_create_bb): Likewise. (df_word_lr_bb_local_compute): Likewise. (df_remove_dead_eq_notes): Likewise for param "insn". (df_note_bb_compute): Likewise for local "insn". (simulate_backwards_to_point): Likewise. (df_md_bb_local_compute): Likewise. * df-scan.c (df_scan_free_bb_info): Likewise. (df_scan_start_dump): Likewise. (df_scan_start_block): Likewise. (df_install_ref_incremental): Likewise for local "insn". (df_insn_rescan_all): Likewise. (df_reorganize_refs_by_reg_by_insn): Likewise. (df_reorganize_refs_by_insn_bb): Likewise. (df_recompute_luids): Likewise. (df_bb_refs_record): Likewise. (df_update_entry_exit_and_calls): Likewise. (df_bb_verify): Likewise. From-SVN: r214318 --- gcc/ChangeLog | 29 +++++++++++++++++++++++++++++ gcc/df-core.c | 4 ++-- gcc/df-problems.c | 20 ++++++++++---------- gcc/df-scan.c | 24 ++++++++++++------------ 4 files changed, 53 insertions(+), 24 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 75ab1fe58b3..f6f8d0d4047 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,32 @@ +2014-08-22 David Malcolm + + * df-core.c (df_bb_regno_first_def_find): Strengthen local "insn" + from rtx to rtx_insn *. + (df_bb_regno_last_def_find): Likewise. + + * df-problems.c (df_rd_bb_local_compute): Likewise. + (df_lr_bb_local_compute): Likewise. + (df_live_bb_local_compute): Likewise. + (df_chain_remove_problem): Likewise. + (df_chain_create_bb): Likewise. + (df_word_lr_bb_local_compute): Likewise. + (df_remove_dead_eq_notes): Likewise for param "insn". + (df_note_bb_compute): Likewise for local "insn". + (simulate_backwards_to_point): Likewise. + (df_md_bb_local_compute): Likewise. + + * df-scan.c (df_scan_free_bb_info): Likewise. + (df_scan_start_dump): Likewise. + (df_scan_start_block): Likewise. + (df_install_ref_incremental): Likewise for local "insn". + (df_insn_rescan_all): Likewise. + (df_reorganize_refs_by_reg_by_insn): Likewise. + (df_reorganize_refs_by_insn_bb): Likewise. + (df_recompute_luids): Likewise. + (df_bb_refs_record): Likewise. + (df_update_entry_exit_and_calls): Likewise. + (df_bb_verify): Likewise. + 2014-08-22 David Malcolm * ddg.h (struct ddg_node): Strengthen fields "insn" and diff --git a/gcc/df-core.c b/gcc/df-core.c index 5d32fa3e795..5c5b1ae2784 100644 --- a/gcc/df-core.c +++ b/gcc/df-core.c @@ -1943,7 +1943,7 @@ df_set_clean_cfg (void) df_ref df_bb_regno_first_def_find (basic_block bb, unsigned int regno) { - rtx insn; + rtx_insn *insn; df_ref def; FOR_BB_INSNS (bb, insn) @@ -1964,7 +1964,7 @@ df_bb_regno_first_def_find (basic_block bb, unsigned int regno) df_ref df_bb_regno_last_def_find (basic_block bb, unsigned int regno) { - rtx insn; + rtx_insn *insn; df_ref def; FOR_BB_INSNS_REVERSE (bb, insn) diff --git a/gcc/df-problems.c b/gcc/df-problems.c index e8248659a77..65f9b4cb047 100644 --- a/gcc/df-problems.c +++ b/gcc/df-problems.c @@ -348,7 +348,7 @@ df_rd_bb_local_compute (unsigned int bb_index) { basic_block bb = BASIC_BLOCK_FOR_FN (cfun, bb_index); struct df_rd_bb_info *bb_info = df_rd_get_bb_info (bb_index); - rtx insn; + rtx_insn *insn; bitmap_clear (&seen_in_block); bitmap_clear (&seen_in_insn); @@ -828,7 +828,7 @@ df_lr_bb_local_compute (unsigned int bb_index) { basic_block bb = BASIC_BLOCK_FOR_FN (cfun, bb_index); struct df_lr_bb_info *bb_info = df_lr_get_bb_info (bb_index); - rtx insn; + rtx_insn *insn; df_ref def, use; /* Process the registers set in an exception handler. */ @@ -1435,7 +1435,7 @@ df_live_bb_local_compute (unsigned int bb_index) { basic_block bb = BASIC_BLOCK_FOR_FN (cfun, bb_index); struct df_live_bb_info *bb_info = df_live_get_bb_info (bb_index); - rtx insn; + rtx_insn *insn; df_ref def; int luid = 0; @@ -1951,7 +1951,7 @@ df_chain_remove_problem (void) EXECUTE_IF_SET_IN_BITMAP (df_chain->out_of_date_transfer_functions, 0, bb_index, bi) { - rtx insn; + rtx_insn *insn; df_ref def, use; basic_block bb = BASIC_BLOCK_FOR_FN (cfun, bb_index); @@ -2067,7 +2067,7 @@ df_chain_create_bb (unsigned int bb_index) { basic_block bb = BASIC_BLOCK_FOR_FN (cfun, bb_index); struct df_rd_bb_info *bb_info = df_rd_get_bb_info (bb_index); - rtx insn; + rtx_insn *insn; bitmap_head cpy; bitmap_initialize (&cpy, &bitmap_default_obstack); @@ -2462,7 +2462,7 @@ df_word_lr_bb_local_compute (unsigned int bb_index) { basic_block bb = BASIC_BLOCK_FOR_FN (cfun, bb_index); struct df_word_lr_bb_info *bb_info = df_word_lr_get_bb_info (bb_index); - rtx insn; + rtx_insn *insn; df_ref def, use; /* Ensure that artificial refs don't contain references to pseudos. */ @@ -2796,7 +2796,7 @@ df_remove_dead_and_unused_notes (rtx insn) as the bitmap of currently live registers. */ static void -df_remove_dead_eq_notes (rtx insn, bitmap live) +df_remove_dead_eq_notes (rtx_insn *insn, bitmap live) { rtx *pprev = ®_NOTES (insn); rtx link = *pprev; @@ -3063,7 +3063,7 @@ df_note_bb_compute (unsigned int bb_index, bitmap live, bitmap do_not_gen, bitmap artificial_uses) { basic_block bb = BASIC_BLOCK_FOR_FN (cfun, bb_index); - rtx insn; + rtx_insn *insn; df_ref def, use; struct dead_debug_local debug; @@ -3632,7 +3632,7 @@ find_memory_stores (rtx x, const_rtx pat ATTRIBUTE_UNUSED, void simulate_backwards_to_point (basic_block bb, regset live, rtx point) { - rtx insn; + rtx_insn *insn; bitmap_copy (live, df_get_live_out (bb)); df_simulate_initialize_backwards (bb, live); @@ -4113,7 +4113,7 @@ df_md_bb_local_compute (unsigned int bb_index) { basic_block bb = BASIC_BLOCK_FOR_FN (cfun, bb_index); struct df_md_bb_info *bb_info = df_md_get_bb_info (bb_index); - rtx insn; + rtx_insn *insn; /* Artificials are only hard regs. */ if (!(df->changeable_flags & DF_NO_HARD_REGS)) diff --git a/gcc/df-scan.c b/gcc/df-scan.c index f1ba808c258..a8539143da8 100644 --- a/gcc/df-scan.c +++ b/gcc/df-scan.c @@ -229,7 +229,7 @@ df_scan_free_bb_info (basic_block bb, void *vbb_info) { struct df_scan_bb_info *bb_info = (struct df_scan_bb_info *) vbb_info; unsigned int bb_index = bb->index; - rtx insn; + rtx_insn *insn; FOR_BB_INSNS (bb, insn) if (INSN_P (insn)) @@ -344,7 +344,7 @@ df_scan_start_dump (FILE *file ATTRIBUTE_UNUSED) int icount = 0; int ccount = 0; basic_block bb; - rtx insn; + rtx_insn *insn; fprintf (file, ";; invalidated by call \t"); df_print_regset (file, regs_invalidated_by_call_regset); @@ -423,7 +423,7 @@ df_scan_start_block (basic_block bb, FILE *file) } #if 0 { - rtx insn; + rtx_insn *insn; FOR_BB_INSNS (bb, insn) if (INSN_P (insn)) df_insn_debug (insn, false, file); @@ -643,7 +643,7 @@ df_install_ref_incremental (df_ref ref) df_ref *ref_ptr; bool add_to_table; - rtx insn = DF_REF_INSN (ref); + rtx_insn *insn = DF_REF_INSN (ref); basic_block bb = BLOCK_FOR_INSN (insn); if (DF_REF_REG_DEF_P (ref)) @@ -1210,7 +1210,7 @@ df_insn_rescan_all (void) FOR_EACH_BB_FN (bb, cfun) { - rtx insn; + rtx_insn *insn; FOR_BB_INSNS (bb, insn) { df_insn_rescan (insn); @@ -1431,7 +1431,7 @@ df_reorganize_refs_by_reg_by_insn (struct df_ref_info *ref_info, EXECUTE_IF_SET_IN_BITMAP (df->blocks_to_analyze, 0, bb_index, bi) { basic_block bb = BASIC_BLOCK_FOR_FN (cfun, bb_index); - rtx insn; + rtx_insn *insn; df_ref def, use; if (include_defs) @@ -1485,7 +1485,7 @@ df_reorganize_refs_by_reg_by_insn (struct df_ref_info *ref_info, EXECUTE_IF_SET_IN_BITMAP (df->blocks_to_analyze, 0, bb_index, bi) { basic_block bb = BASIC_BLOCK_FOR_FN (cfun, bb_index); - rtx insn; + rtx_insn *insn; df_ref def, use; if (include_defs) @@ -1611,7 +1611,7 @@ df_reorganize_refs_by_insn_bb (basic_block bb, unsigned int offset, bool include_defs, bool include_uses, bool include_eq_uses) { - rtx insn; + rtx_insn *insn; if (include_defs) offset = df_add_refs_to_table (offset, ref_info, @@ -3272,7 +3272,7 @@ df_insn_refs_collect (struct df_collection_rec *collection_rec, void df_recompute_luids (basic_block bb) { - rtx insn; + rtx_insn *insn; int luid = 0; df_grow_insn_info (); @@ -3366,7 +3366,7 @@ void df_bb_refs_record (int bb_index, bool scan_insns) { basic_block bb = BASIC_BLOCK_FOR_FN (cfun, bb_index); - rtx insn; + rtx_insn *insn; int luid = 0; if (!df) @@ -3903,7 +3903,7 @@ df_update_entry_exit_and_calls (void) in the set of registers clobbered across the call. */ FOR_EACH_BB_FN (bb, cfun) { - rtx insn; + rtx_insn *insn; FOR_BB_INSNS (bb, insn) { if (INSN_P (insn) && CALL_P (insn)) @@ -4165,7 +4165,7 @@ df_insn_refs_verify (struct df_collection_rec *collection_rec, static bool df_bb_verify (basic_block bb) { - rtx insn; + rtx_insn *insn; struct df_scan_bb_info *bb_info = df_scan_get_bb_info (bb->index); struct df_collection_rec collection_rec; -- 2.30.2