diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-15 07:39:30 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-15 07:39:30 +0000 |
commit | ddc2d0e33079b5cc3680457882d4dc29c66283e2 (patch) | |
tree | c9cc0c7a93ee539a01637eb16e85ac19667e3c9b /gcc/df-problems.c | |
parent | 7b416b3fde3b4bf1f86c6e306aed7849366b5444 (diff) | |
download | gcc-ddc2d0e33079b5cc3680457882d4dc29c66283e2.tar.gz |
gcc/
* df.h (df_mw_hardreg, df_base_ref): Add a link pointer.
(df_insn_info): Turn defs, uses, eq_uses and mw_hardregs into linked
lists.
(df_scan_bb_info): Likewise artificial_defs and artificial_uses.
(DF_REF_NEXT_LOC, DF_MWS_NEXT): New macros.
(FOR_EACH_INSN_INFO_DEF, FOR_EACH_INSN_INFO_USE)
(FOR_EACH_INSN_INFO_EQ_USE, FOR_EACH_INSN_INFO_MW)
(FOR_EACH_ARTIFICIAL_USE, FOR_EACH_ARTIFICIAL_DEF)
(df_get_artificial_defs, df_get_artificial_uses)
(df_single_def, df_single_use): Update accordingly.
(df_refs_chain_dump): Take the first element in a linked list as
parameter, rather than a pointer to an array of pointers.
* df-core.c (df_refs_chain_dump, df_mws_dump): Likewise.
* df-problems.c (df_rd_bb_local_compute_process_def): Likewise.
(df_chain_create_bb_process_use): Likewise.
(df_md_bb_local_compute_process_def): Likewise.
* fwprop.c (process_defs, process_uses): Likewise.
(register_active_defs, update_uses): Likewise.
(forward_propagate_asm): Update for new df_ref linking.
* df-scan.c (df_scan_free_ref_vec, df_scan_free_mws_vec): Delete.
(df_null_ref_rec, df_null_mw_rec): Likewise.
(df_scan_free_internal): Don't free df_ref and df_mw_hardreg lists
explicitly.
(df_scan_free_bb_info): Remove check for null artificial_defs.
(df_install_ref_incremental): Adjust for new df_ref linking.
Use a single-element insertion rather than a full sort.
(df_ref_chain_delete_du_chain): Take the first element
in a linked list as parameter, rather than a pointer to an array of
pointers.
(df_ref_chain_delete, df_mw_hardreg_chain_delete): Likewise.
(df_add_refs_to_table, df_refs_verify, df_mws_verify): Likewise.
(df_insn_info_delete): Remove check for null defs and call to
df_scan_free_mws_vec.
(df_insn_rescan): Initialize df_ref and df_mw_hardreg lists to
null rather than df_null_*_rec.
(df_insn_rescan_debug_internal): Likewise, and update null
checks in the same way. Remove check for null defs.
(df_ref_change_reg_with_loc_1): Fix choice of list for defs.
Move a single element rather doing a full sort.
(df_mw_hardreg_chain_delete_eq_uses): Adjust for new df_mw_hardreg
linking.
(df_notes_rescan): Likewise. Use a merge rather than a full sort.
Initialize df_ref and df_mw_hardreg lists to null rather than
df_null_*_rec.
(df_ref_compare): Take df_refs as parameter, transferring the
old interface to...
(df_ref_ptr_compare): ...this new function.
(df_sort_and_compress_refs): Update accordingly.
(df_mw_compare): Take df_mw_hardregs as parameter, transferring the
old interface to...
(df_mw_ptr_compare): ...this new function.
(df_sort_and_compress_mws): Update accordingly.
(df_install_refs, df_install_mws): Return a linked list rather than
an array of pointers.
(df_refs_add_to_chains): Assert that old lists are empty rather
than freeing them.
(df_insn_refs_verify): Don't handle null defs speciailly.
* web.c (union_match_dups): Update for new df_ref linking.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211683 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/df-problems.c')
-rw-r--r-- | gcc/df-problems.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/gcc/df-problems.c b/gcc/df-problems.c index d97e2870aea..e8248659a77 100644 --- a/gcc/df-problems.c +++ b/gcc/df-problems.c @@ -291,12 +291,11 @@ df_rd_simulate_one_insn (basic_block bb ATTRIBUTE_UNUSED, rtx insn, static void df_rd_bb_local_compute_process_def (struct df_rd_bb_info *bb_info, - df_ref *def_rec, + df_ref def, int top_flag) { - while (*def_rec) + for (; def; def = DF_REF_NEXT_LOC (def)) { - df_ref def = *def_rec; if (top_flag == (DF_REF_FLAGS (def) & DF_REF_AT_TOP)) { unsigned int regno = DF_REF_REGNO (def); @@ -339,7 +338,6 @@ df_rd_bb_local_compute_process_def (struct df_rd_bb_info *bb_info, } } } - def_rec++; } } @@ -2022,15 +2020,14 @@ df_chain_reset (bitmap blocks_to_clear ATTRIBUTE_UNUSED) static void df_chain_create_bb_process_use (bitmap local_rd, - df_ref *use_rec, + df_ref use, int top_flag) { bitmap_iterator bi; unsigned int def_index; - while (*use_rec) + for (; use; use = DF_REF_NEXT_LOC (use)) { - df_ref use = *use_rec; unsigned int uregno = DF_REF_REGNO (use); if ((!(df->changeable_flags & DF_NO_HARD_REGS)) || (uregno >= FIRST_PSEUDO_REGISTER)) @@ -2059,8 +2056,6 @@ df_chain_create_bb_process_use (bitmap local_rd, } } } - - use_rec++; } } @@ -4077,13 +4072,12 @@ df_md_simulate_one_insn (basic_block bb ATTRIBUTE_UNUSED, rtx insn, static void df_md_bb_local_compute_process_def (struct df_md_bb_info *bb_info, - df_ref *def_rec, + df_ref def, int top_flag) { - df_ref def; bitmap_clear (&seen_in_insn); - while ((def = *def_rec++) != NULL) + for (; def; def = DF_REF_NEXT_LOC (def)) { unsigned int dregno = DF_REF_REGNO (def); if (((!(df->changeable_flags & DF_NO_HARD_REGS)) |