aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2004-09-20 21:19:00 -0600
committerJeff Law <law@gcc.gnu.org>2004-09-20 21:19:00 -0600
commit6f2aec072e075953002d9b9afb7aed7224e33d71 (patch)
treed63342eb84f672e7ec05ab0664ccacf61232ea1a /gcc/tree.h
parentc162c75e43f4813cd30a1d4a693ce20f35a3f9fb (diff)
downloadgcc-6f2aec072e075953002d9b9afb7aed7224e33d71.zip
gcc-6f2aec072e075953002d9b9afb7aed7224e33d71.tar.gz
gcc-6f2aec072e075953002d9b9afb7aed7224e33d71.tar.bz2
tree-ssanames.c (make_ssa_name): No longer need to clear, then initialize key elements here.
* tree-ssanames.c (make_ssa_name): No longer need to clear, then initialize key elements here. (release_ssa_name): Zero the released SSA_NAME here. * tree.h (SSA_NAME_EQUIV, SET_SSA_NAME_EQUIV): New macros. (struct tree_ssa_name): Add new "equiv" field. * tree-ssa-dom.c (const_and_copies): Kill the global varray. (tree_ssa_dominator_optimize): No longer allocate, resize or clear CONST_AND_COPIES. (get_value_for, set_value_for): Kill. (thread_across_edge): Get/set the equivalency using SSA_NAME_EQUIV and SET_SSA_NAME_EQUIV. (restore_vars_to_original_value): Likewise. (record_equivalences_from_phis): Likewise. (record_dominating_conditions): Likewise. (record_const_or_copy, record_equality): Likewise. (lookup_avail_expr): Likewise. (record_equivalences_from_stmt, cprop_operand): Likewise. (cprop_into_successor_phis): No longer need to pass around CONST_AND_COPIES. Callers updated. Get equivalences via SSA_NAME_EQUIV. (cprop_into_phis): Likewise. Co-Authored-By: Jan Hubicka <jh@suse.cz> From-SVN: r87787
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 17f0475..0f78e74 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1304,12 +1304,23 @@ struct tree_exp GTY(())
#define SSA_NAME_OCCURS_IN_ABNORMAL_PHI(NODE) \
SSA_NAME_CHECK (NODE)->common.asm_written_flag
+
/* Nonzero if this SSA_NAME expression is currently on the free list of
SSA_NAMES. Using NOTHROW_FLAG seems reasonably safe since throwing
has no meaning for an SSA_NAME. */
#define SSA_NAME_IN_FREE_LIST(NODE) \
SSA_NAME_CHECK (NODE)->common.nothrow_flag
+#define SSA_NAME_EQUIV(NAME) __extension__ \
+ ({ tree equiv = SSA_NAME_CHECK (NAME)->ssa_name.equiv; \
+ if (equiv && TREE_CODE (equiv) == SSA_NAME) \
+ equiv = ssa_name (SSA_NAME_VERSION (equiv)); \
+ equiv; \
+ })
+
+#define SET_SSA_NAME_EQUIV(NAME, EQUIV)\
+ SSA_NAME_CHECK (NAME)->ssa_name.equiv = (EQUIV);
+
/* Attributes for SSA_NAMEs for pointer-type variables. */
#define SSA_NAME_PTR_INFO(N) \
SSA_NAME_CHECK (N)->ssa_name.ptr_info
@@ -1333,6 +1344,8 @@ struct tree_ssa_name GTY(())
/* _DECL wrapped by this SSA name. */
tree var;
+ tree equiv;
+
/* SSA version number. */
unsigned int version;