diff options
author | Steven Bosscher <steven@gcc.gnu.org> | 2008-06-18 05:42:23 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2008-06-18 05:42:23 +0000 |
commit | 50e94c7e583d2be25b1f940923fa01203aac65c3 (patch) | |
tree | 0c8c1622859a712e7e554f00afbc548652bc9317 /gcc/dce.c | |
parent | 00bb81c15b2976156db1be68faee7071e9efdf8b (diff) | |
download | gcc-50e94c7e583d2be25b1f940923fa01203aac65c3.zip gcc-50e94c7e583d2be25b1f940923fa01203aac65c3.tar.gz gcc-50e94c7e583d2be25b1f940923fa01203aac65c3.tar.bz2 |
df.h (struct df_ref): Replace 'insn' field with 'insn_info' field.
* df.h (struct df_ref): Replace 'insn' field with 'insn_info' field.
(DF_REF_INSN_INFO): New.
(DF_REF_INSN, DF_REF_INSN_UID): Rewrite macros using DF_REF_INSN_INFO.
(DF_REF_IS_ARTIFICIAL): Artificial refs are now identified as refs
with a NULL DF_REF_INSN_INFO.
(DF_INSN_INFO_GET, DF_INSN_INFO_SET): Renamed from DF_INSN_GET and
DF_INSN_SET.
(DF_INSN_INFO_LUID, DF_INSN_INFO_DEFS, DF_INSN_INFO_USES,
DF_INSN_INFO_EQ_USES): New.
(DF_INSN_LUID, DF_INSN_DEFS, DF_INSN_USES, DF_INSN_EQ_USES,
DF_INSN_UID_LUID, DF_INSN_UID_DEFS, DF_INSN_UID_USES,
DF_INSN_UID_EQ_USES): Rewrite using DF_INSN_INFO_* macros.
* df-core.c: Update comment for above changes.
(df_insn_debug_regno): Use DF_INSN_INFO_GET instead of INSN_UID and
DF_INSN_UID_* macros.
(df_ref_debug): Check for NULL DF_REF_INSN_INFO.
* df-scan.c (df_ref_record): Take a df_insn_info instead of an
insn rtx. Update all callers.
(df_def_record_1, df_defs_record, df_uses_record, df_get_call_refs,
df_ref_create_structure, df_insn_refs_collect): Likewise.
(df_ref_equal_p): Compare DF_REF_INSN_INFO pointers for the refs.
* df-problems.c (df_chain_dump): Test for non-NULL DF_REF_INSN_INFO.
(df_live_bb_local_compute): Retrieve DF_INSN_INFO, use DF_INSN_INFO_*
macros to access the insn refs.
(df_chain_top_dump, df_chain_bottom_dump, df_byte_lr_alloc): Likewise.
* fwprop.c (use_killed_between): Use DF_REF_INSN accessor macro.
(all_uses_available): Retrieve DF_INSN_INFO for def_insn, and use it
for accessing the refs.
(try_fwprop_subst): Likewise.
* ddg.c (add_cross_iteration_register_deps): Use DF_REF_INSN macro.
* web.c (union_defs): Retrieve DF_INSN_INFO for def_insn, and use it
for accessing the refs.
* loop-invariant.c (invariant_for_use): Use DF_REF_BB macro.
(check_dependencies): Use DF_INSN_INFO_GET, use DF_INSN_INFO_* macros
to look at the insn refs.
(record_uses): Likewise.
* dce.c (deletable_insn_p): Don't tolerate artificial DEFs in this
function anymore.
(mark_artificial_uses): Don't mark_insn for artificial refs.
(mark_reg_rependencies): Likewise.
* doc/rtl.texi: Remove documentation of ADDRESSOF.
From-SVN: r136885
Diffstat (limited to 'gcc/dce.c')
-rw-r--r-- | gcc/dce.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -154,12 +154,10 @@ deletable_insn_p (rtx insn, bool fast) static inline int marked_insn_p (rtx insn) { - if (insn) - return TEST_BIT (marked, INSN_UID (insn)); - else - /* Artificial defs are always needed and they do not have an - insn. */ - return true; + /* Artificial defs are always needed and they do not have an insn. + We should never see them here. */ + gcc_assert (insn); + return TEST_BIT (marked, INSN_UID (insn)); } @@ -339,7 +337,8 @@ mark_artificial_uses (void) for (use_rec = df_get_artificial_uses (bb->index); *use_rec; use_rec++) for (defs = DF_REF_CHAIN (*use_rec); defs; defs = defs->next) - mark_insn (DF_REF_INSN (defs->ref), false); + if (! DF_REF_IS_ARTIFICIAL (defs->ref)) + mark_insn (DF_REF_INSN (defs->ref), false); } } @@ -362,7 +361,8 @@ mark_reg_dependencies (rtx insn) fprintf (dump_file, " in insn %d:\n", INSN_UID (insn)); } for (defs = DF_REF_CHAIN (use); defs; defs = defs->next) - mark_insn (DF_REF_INSN (defs->ref), false); + if (! DF_REF_IS_ARTIFICIAL (defs->ref)) + mark_insn (DF_REF_INSN (defs->ref), false); } } |