diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2014-06-15 07:32:43 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2014-06-15 07:32:43 +0000 |
commit | 292321a5cd9b5988a0e73adaa0ad637a9a17b4d4 (patch) | |
tree | 12094325c8b60fc5ff9b26dd40bcb17e41bcfaa5 /gcc/df-scan.c | |
parent | bfac633a90588e96050f8767052d59efd7307cb1 (diff) | |
download | gcc-292321a5cd9b5988a0e73adaa0ad637a9a17b4d4.zip gcc-292321a5cd9b5988a0e73adaa0ad637a9a17b4d4.tar.gz gcc-292321a5cd9b5988a0e73adaa0ad637a9a17b4d4.tar.bz2 |
df.h (FOR_EACH_ARTIFICIAL_USE, [...]): New macros.
gcc/
* df.h (FOR_EACH_ARTIFICIAL_USE, FOR_EACH_ARTIFICIAL_DEF): New macros.
* cse.c (cse_extended_basic_block): Use them.
* dce.c (mark_artificial_use): Likewise.
* df-problems.c (df_rd_simulate_artificial_defs_at_top): Likewise.
(df_lr_bb_local_compute, df_live_bb_local_compute): Likewise.
(df_chain_remove_problem, df_chain_bb_dump): Likewise.
(df_word_lr_bb_local_compute, df_note_bb_compute): Likewise.
(df_simulate_initialize_backwards): Likewise.
(df_simulate_finalize_backwards): Likewise.
(df_simulate_initialize_forwards): Likewise.
(df_md_simulate_artificial_defs_at_top): Likewise.
* df-scan.c (df_reorganize_refs_by_reg_by_insn): Likewise.
* regrename.c (init_rename_info): Likewise.
* regstat.c (regstat_bb_compute_ri): Likewise.
(regstat_bb_compute_calls_crossed): Likewise.
From-SVN: r211679
Diffstat (limited to 'gcc/df-scan.c')
-rw-r--r-- | gcc/df-scan.c | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/gcc/df-scan.c b/gcc/df-scan.c index d4dc48d..b2d5147 100644 --- a/gcc/df-scan.c +++ b/gcc/df-scan.c @@ -1639,19 +1639,18 @@ df_reorganize_refs_by_reg_by_insn (struct df_ref_info *ref_info, { basic_block bb = BASIC_BLOCK_FOR_FN (cfun, bb_index); rtx insn; - df_ref *ref_rec; df_ref def, use; if (include_defs) - for (ref_rec = df_get_artificial_defs (bb_index); *ref_rec; ref_rec++) + FOR_EACH_ARTIFICIAL_DEF (def, bb_index) { - unsigned int regno = DF_REF_REGNO (*ref_rec); + unsigned int regno = DF_REF_REGNO (def); ref_info->count[regno]++; } if (include_uses) - for (ref_rec = df_get_artificial_uses (bb_index); *ref_rec; ref_rec++) + FOR_EACH_ARTIFICIAL_USE (use, bb_index) { - unsigned int regno = DF_REF_REGNO (*ref_rec); + unsigned int regno = DF_REF_REGNO (use); ref_info->count[regno]++; } @@ -1694,33 +1693,30 @@ df_reorganize_refs_by_reg_by_insn (struct df_ref_info *ref_info, { basic_block bb = BASIC_BLOCK_FOR_FN (cfun, bb_index); rtx insn; - df_ref *ref_rec; df_ref def, use; if (include_defs) - for (ref_rec = df_get_artificial_defs (bb_index); *ref_rec; ref_rec++) + FOR_EACH_ARTIFICIAL_DEF (def, bb_index) { - df_ref ref = *ref_rec; - unsigned int regno = DF_REF_REGNO (ref); + unsigned int regno = DF_REF_REGNO (def); if (regno >= start) { unsigned int id = ref_info->begin[regno] + ref_info->count[regno]++; - DF_REF_ID (ref) = id; - ref_info->refs[id] = ref; + DF_REF_ID (def) = id; + ref_info->refs[id] = def; } } if (include_uses) - for (ref_rec = df_get_artificial_uses (bb_index); *ref_rec; ref_rec++) + FOR_EACH_ARTIFICIAL_USE (use, bb_index) { - df_ref ref = *ref_rec; - unsigned int regno = DF_REF_REGNO (ref); + unsigned int regno = DF_REF_REGNO (def); if (regno >= start) { unsigned int id = ref_info->begin[regno] + ref_info->count[regno]++; - DF_REF_ID (ref) = id; - ref_info->refs[id] = ref; + DF_REF_ID (use) = id; + ref_info->refs[id] = use; } } |