aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-sccvn.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2008-07-14 15:38:49 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2008-07-14 15:38:49 +0000
commitcaf55296b96659b2e2635680df283af32f8fa5d7 (patch)
treef75e8afb6ceee98eeb6903a3791525145691294c /gcc/tree-ssa-sccvn.c
parentd27cc24c97bbd7f27e7bde76a04af56e773b82fe (diff)
downloadgcc-caf55296b96659b2e2635680df283af32f8fa5d7.zip
gcc-caf55296b96659b2e2635680df283af32f8fa5d7.tar.gz
gcc-caf55296b96659b2e2635680df283af32f8fa5d7.tar.bz2
tree-ssa-sccvn.c (pre_info): Remove.
2008-07-14 Richard Guenther <rguenther@suse.de> * tree-ssa-sccvn.c (pre_info): Remove. (switch_to_PRE_table): Likewise. (free_scc_vn): Do not clear SSA_NAME_VALUE. Do not free pre_info. (set_hashtable_value_ids): Do not create value-ids for the optimistic tables. (run_scc_vn): Remove double test. Remove bogus special-case in value-number printing. * tree-ssa-sccvn.h (switch_to_PRE_table): Remove. * tree-ssa-ccp.c (get_symbol_constant_value): Do not look at SSA_NAME_VALUE. * tree-flow-inline.h (get_value_handle): Remove. * tree-flow.h (get_value_handle): Remove. From-SVN: r137787
Diffstat (limited to 'gcc/tree-ssa-sccvn.c')
-rw-r--r--gcc/tree-ssa-sccvn.c73
1 files changed, 6 insertions, 67 deletions
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index 659fecd..f131865 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -129,11 +129,6 @@ static vn_tables_t valid_info;
static vn_tables_t optimistic_info;
-/* PRE hashtables storing information about mapping from expressions to
- value handles. */
-
-static vn_tables_t pre_info;
-
/* Pointer to the set of hashtables that is currently being used.
Should always point to either the optimistic_info, or the
valid_info. */
@@ -2376,15 +2371,6 @@ init_scc_vn (void)
allocate_vn_table (valid_info);
optimistic_info = XCNEW (struct vn_tables_s);
allocate_vn_table (optimistic_info);
- pre_info = NULL;
-}
-
-void
-switch_to_PRE_table (void)
-{
- pre_info = XCNEW (struct vn_tables_s);
- allocate_vn_table (pre_info);
- current_info = pre_info;
}
void
@@ -2403,9 +2389,6 @@ free_scc_vn (void)
{
tree name = ssa_name (i);
if (name
- && SSA_NAME_VALUE (name))
- SSA_NAME_VALUE (name) = NULL;
- if (name
&& VN_INFO (name)->needs_insertion)
release_ssa_name (name);
}
@@ -2417,14 +2400,9 @@ free_scc_vn (void)
XDELETE (valid_info);
free_vn_table (optimistic_info);
XDELETE (optimistic_info);
- if (pre_info)
- {
- free_vn_table (pre_info);
- XDELETE (pre_info);
- }
}
-/* Set the value ids in the valid/optimistic hash tables. */
+/* Set the value ids in the valid hash tables. */
static void
set_hashtable_value_ids (void)
@@ -2433,7 +2411,7 @@ set_hashtable_value_ids (void)
vn_nary_op_t vno;
vn_reference_t vr;
vn_phi_t vp;
-
+
/* Now set the value ids of the things we had put in the hash
table. */
@@ -2449,18 +2427,6 @@ set_hashtable_value_ids (void)
}
}
- FOR_EACH_HTAB_ELEMENT (optimistic_info->nary,
- vno, vn_nary_op_t, hi)
- {
- if (vno->result)
- {
- if (TREE_CODE (vno->result) == SSA_NAME)
- vno->value_id = VN_INFO (vno->result)->value_id;
- else if (is_gimple_min_invariant (vno->result))
- vno->value_id = get_or_alloc_constant_value_id (vno->result);
- }
- }
-
FOR_EACH_HTAB_ELEMENT (valid_info->phis,
vp, vn_phi_t, hi)
{
@@ -2472,18 +2438,6 @@ set_hashtable_value_ids (void)
vp->value_id = get_or_alloc_constant_value_id (vp->result);
}
}
- FOR_EACH_HTAB_ELEMENT (optimistic_info->phis,
- vp, vn_phi_t, hi)
- {
- if (vp->result)
- {
- if (TREE_CODE (vp->result) == SSA_NAME)
- vp->value_id = VN_INFO (vp->result)->value_id;
- else if (is_gimple_min_invariant (vp->result))
- vp->value_id = get_or_alloc_constant_value_id (vp->result);
- }
- }
-
FOR_EACH_HTAB_ELEMENT (valid_info->references,
vr, vn_reference_t, hi)
@@ -2496,17 +2450,6 @@ set_hashtable_value_ids (void)
vr->value_id = get_or_alloc_constant_value_id (vr->result);
}
}
- FOR_EACH_HTAB_ELEMENT (optimistic_info->references,
- vr, vn_reference_t, hi)
- {
- if (vr->result)
- {
- if (TREE_CODE (vr->result) == SSA_NAME)
- vr->value_id = VN_INFO (vr->result)->value_id;
- else if (is_gimple_min_invariant (vr->result))
- vr->value_id = get_or_alloc_constant_value_id (vr->result);
- }
- }
}
/* Do SCCVN. Returns true if it finished, false if we bailed out
@@ -2577,7 +2520,6 @@ run_scc_vn (bool may_insert_arg)
info = VN_INFO (name);
if (TREE_CODE (info->valnum) == SSA_NAME
&& info->valnum != name
- && TREE_CODE (info->valnum) == SSA_NAME
&& info->value_id != VN_INFO (info->valnum)->value_id)
{
changed = true;
@@ -2594,16 +2536,13 @@ run_scc_vn (bool may_insert_arg)
for (i = 0; i < num_ssa_names; i++)
{
tree name = ssa_name (i);
- if (name && VN_INFO (name)->visited
- && (SSA_VAL (name) != name
- || is_gimple_min_invariant (VN_INFO (name)->expr)))
+ if (name
+ && VN_INFO (name)->visited
+ && SSA_VAL (name) != name)
{
print_generic_expr (dump_file, name, 0);
fprintf (dump_file, " = ");
- if (is_gimple_min_invariant (VN_INFO (name)->expr))
- print_generic_expr (dump_file, VN_INFO (name)->expr, 0);
- else
- print_generic_expr (dump_file, SSA_VAL (name), 0);
+ print_generic_expr (dump_file, SSA_VAL (name), 0);
fprintf (dump_file, "\n");
}
}