summaryrefslogtreecommitdiff
path: root/gcc/df.h
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-18 05:42:23 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-18 05:42:23 +0000
commit158b6cc9bfed6b3b97b121d8ce7f4e62c2382651 (patch)
tree0c8c1622859a712e7e554f00afbc548652bc9317 /gcc/df.h
parent594fa6a7f0bfd36eb2f23d88f7832856d517d1e4 (diff)
downloadgcc-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/df.h')
-rw-r--r--gcc/df.h31
1 files changed, 19 insertions, 12 deletions
diff --git a/gcc/df.h b/gcc/df.h
index bd4d7ff7aca..30e98507d41 100644
--- a/gcc/df.h
+++ b/gcc/df.h
@@ -370,9 +370,10 @@ struct df_ref
rtx reg; /* The register referenced. */
basic_block bb; /* Basic block containing the instruction. */
- /* Insn containing ref. This will be null if this is an artificial
- reference. */
- rtx insn;
+ /* Insn info for the insn containing ref. This will be null if this is
+ an artificial reference. */
+ struct df_insn_info *insn_info;
+
rtx *loc; /* The location of the reg. */
struct df_link *chain; /* Head of def-use, use-def. */
/* Location in the ref table. This is only valid after a call to
@@ -612,8 +613,9 @@ struct df
#define DF_REF_LOC(REF) ((REF)->loc)
#define DF_REF_BB(REF) ((REF)->bb)
#define DF_REF_BBNO(REF) (DF_REF_BB (REF)->index)
-#define DF_REF_INSN(REF) ((REF)->insn)
-#define DF_REF_INSN_UID(REF) (INSN_UID ((REF)->insn))
+#define DF_REF_INSN_INFO(REF) ((REF)->insn_info)
+#define DF_REF_INSN(REF) ((REF)->insn_info->insn)
+#define DF_REF_INSN_UID(REF) (INSN_UID (DF_REF_INSN(REF)))
#define DF_REF_TYPE(REF) ((REF)->type)
#define DF_REF_CHAIN(REF) ((REF)->chain)
#define DF_REF_ID(REF) ((REF)->id)
@@ -626,7 +628,7 @@ struct df
but an artificial one created to model
always live registers, eh uses, etc.
ARTIFICIAL refs has NULL insn. */
-#define DF_REF_IS_ARTIFICIAL(REF) ((REF)->insn == NULL)
+#define DF_REF_IS_ARTIFICIAL(REF) ((REF)->insn_info == NULL)
#define DF_REF_REG_MARK(REF) (DF_REF_FLAGS_SET ((REF),DF_REF_REG_MARKER))
#define DF_REF_REG_UNMARK(REF) (DF_REF_FLAGS_CLEAR ((REF),DF_REF_REG_MARKER))
#define DF_REF_IS_REG_MARKED(REF) (DF_REF_FLAGS_IS_SET ((REF),DF_REF_REG_MARKER))
@@ -691,12 +693,17 @@ struct df
/* Macros to access the elements within the insn_info structure table. */
#define DF_INSN_SIZE() ((df)->insns_size)
-#define DF_INSN_GET(INSN) (df->insns[(INSN_UID(INSN))])
-#define DF_INSN_SET(INSN,VAL) (df->insns[(INSN_UID (INSN))]=(VAL))
-#define DF_INSN_LUID(INSN) (DF_INSN_GET(INSN)->luid)
-#define DF_INSN_DEFS(INSN) (DF_INSN_GET(INSN)->defs)
-#define DF_INSN_USES(INSN) (DF_INSN_GET(INSN)->uses)
-#define DF_INSN_EQ_USES(INSN) (DF_INSN_GET(INSN)->eq_uses)
+#define DF_INSN_INFO_GET(INSN) (df->insns[(INSN_UID(INSN))])
+#define DF_INSN_INFO_SET(INSN,VAL) (df->insns[(INSN_UID (INSN))]=(VAL))
+#define DF_INSN_INFO_LUID(II) ((II)->luid)
+#define DF_INSN_INFO_DEFS(II) ((II)->defs)
+#define DF_INSN_INFO_USES(II) ((II)->uses)
+#define DF_INSN_INFO_EQ_USES(II) ((II)->eq_uses)
+
+#define DF_INSN_LUID(INSN) (DF_INSN_INFO_LUID (DF_INSN_INFO_GET(INSN)))
+#define DF_INSN_DEFS(INSN) (DF_INSN_INFO_DEFS (DF_INSN_INFO_GET(INSN)))
+#define DF_INSN_USES(INSN) (DF_INSN_INFO_USES (DF_INSN_INFO_GET(INSN)))
+#define DF_INSN_EQ_USES(INSN) (DF_INSN_INFO_EQ_USES (DF_INSN_INFO_GET(INSN)))
#define DF_INSN_UID_GET(UID) (df->insns[(UID)])
#define DF_INSN_UID_SET(UID,VAL) (df->insns[(UID)]=(VAL))