diff options
author | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-06-18 05:42:23 +0000 |
---|---|---|
committer | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-06-18 05:42:23 +0000 |
commit | 158b6cc9bfed6b3b97b121d8ce7f4e62c2382651 (patch) | |
tree | 0c8c1622859a712e7e554f00afbc548652bc9317 /gcc/loop-invariant.c | |
parent | 594fa6a7f0bfd36eb2f23d88f7832856d517d1e4 (diff) | |
download | gcc-158b6cc9bfed6b3b97b121d8ce7f4e62c2382651.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@136885 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-invariant.c')
-rw-r--r-- | gcc/loop-invariant.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c index 66773075dd6..dd75b3a3a8f 100644 --- a/gcc/loop-invariant.c +++ b/gcc/loop-invariant.c @@ -248,7 +248,7 @@ invariant_for_use (struct df_ref *use) { struct df_link *defs; struct df_ref *def; - basic_block bb = BLOCK_FOR_INSN (use->insn), def_bb; + basic_block bb = DF_REF_BB (use), def_bb; if (use->flags & DF_REF_READ_WRITE) return NULL; @@ -768,13 +768,14 @@ check_dependency (basic_block bb, struct df_ref *use, bitmap depends_on) static bool check_dependencies (rtx insn, bitmap depends_on) { + struct df_insn_info *insn_info = DF_INSN_INFO_GET (insn); struct df_ref **use_rec; basic_block bb = BLOCK_FOR_INSN (insn); - for (use_rec = DF_INSN_USES (insn); *use_rec; use_rec++) + for (use_rec = DF_INSN_INFO_USES (insn_info); *use_rec; use_rec++) if (!check_dependency (bb, *use_rec, depends_on)) return false; - for (use_rec = DF_INSN_EQ_USES (insn); *use_rec; use_rec++) + for (use_rec = DF_INSN_INFO_EQ_USES (insn_info); *use_rec; use_rec++) if (!check_dependency (bb, *use_rec, depends_on)) return false; @@ -850,17 +851,18 @@ find_invariant_insn (rtx insn, bool always_reached, bool always_executed) static void record_uses (rtx insn) { + struct df_insn_info *insn_info = DF_INSN_INFO_GET (insn); struct df_ref **use_rec; struct invariant *inv; - for (use_rec = DF_INSN_USES (insn); *use_rec; use_rec++) + for (use_rec = DF_INSN_INFO_USES (insn_info); *use_rec; use_rec++) { struct df_ref *use = *use_rec; inv = invariant_for_use (use); if (inv) record_use (inv->def, DF_REF_REAL_LOC (use), DF_REF_INSN (use)); } - for (use_rec = DF_INSN_EQ_USES (insn); *use_rec; use_rec++) + for (use_rec = DF_INSN_INFO_EQ_USES (insn_info); *use_rec; use_rec++) { struct df_ref *use = *use_rec; inv = invariant_for_use (use); |