aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.c
diff options
context:
space:
mode:
authorDaniel Berlin <dberlin@dberlin.org>2008-11-26 09:46:23 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2008-11-26 09:46:23 +0000
commit3dc211827b11cf4429465e8ac5cd9590a5c0b560 (patch)
treeef0b716452a3ce458930760da82b1c853db49011 /gcc/tree-ssa-structalias.c
parent1dbc1ae77ad4b55903d723266e4ecb18a4ff851a (diff)
downloadgcc-3dc211827b11cf4429465e8ac5cd9590a5c0b560.zip
gcc-3dc211827b11cf4429465e8ac5cd9590a5c0b560.tar.gz
gcc-3dc211827b11cf4429465e8ac5cd9590a5c0b560.tar.bz2
re PR tree-optimization/37869 (PTA results wrong for "non-pointer" variables)
2008-11-25 Daniel Berlin <dberlin@dberlin.org> Richard Guenther <rguenther@suse.de> PR tree-optimization/37869 * tree-ssa-structalias.c (struct constraint_graph): Remove pt_used and number_incoming members. (build_pred_graph): Do not allocate them. (condense_visit): Do not use them. (label_visit): Likewise. (free_var_substitution_info): Do not free them. Co-Authored-By: Richard Guenther <rguenther@suse.de> From-SVN: r142213
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r--gcc/tree-ssa-structalias.c36
1 files changed, 2 insertions, 34 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 11427ec..5083ee5 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -506,16 +506,6 @@ struct constraint_graph
taken. Used for variable substitution. */
bitmap address_taken;
- /* True if points_to bitmap for this node is stored in the hash
- table. */
- sbitmap pt_used;
-
- /* Number of incoming edges remaining to be processed by pointer
- equivalence.
- Used for variable substitution. */
- unsigned int *number_incoming;
-
-
/* Vector of complex constraints for each graph node. Complex
constraints are those involving dereferences or offsets that are
not 0. */
@@ -1101,11 +1091,8 @@ build_pred_graph (void)
graph->points_to = XCNEWVEC (bitmap, graph->size);
graph->eq_rep = XNEWVEC (int, graph->size);
graph->direct_nodes = sbitmap_alloc (graph->size);
- graph->pt_used = sbitmap_alloc (graph->size);
graph->address_taken = BITMAP_ALLOC (&predbitmap_obstack);
- graph->number_incoming = XCNEWVEC (unsigned int, graph->size);
sbitmap_zero (graph->direct_nodes);
- sbitmap_zero (graph->pt_used);
for (j = 0; j < FIRST_REF_NODE; j++)
{
@@ -2008,11 +1995,6 @@ condense_visit (constraint_graph_t graph, struct scc_info *si, unsigned int n)
bitmap_ior_into (graph->points_to[n],
graph->points_to[w]);
}
- EXECUTE_IF_IN_NONNULL_BITMAP (graph->preds[n], 0, i, bi)
- {
- unsigned int rep = si->node_mapping[i];
- graph->number_incoming[rep]++;
- }
}
SET_BIT (si->deleted, n);
}
@@ -2041,21 +2023,10 @@ label_visit (constraint_graph_t graph, struct scc_info *si, unsigned int n)
/* Skip unused edges */
if (w == n || graph->pointer_label[w] == 0)
- {
- graph->number_incoming[w]--;
- continue;
- }
+ continue;
+
if (graph->points_to[w])
bitmap_ior_into(graph->points_to[n], graph->points_to[w]);
-
- /* If all incoming edges to w have been processed and
- graph->points_to[w] was not stored in the hash table, we can
- free it. */
- graph->number_incoming[w]--;
- if (!graph->number_incoming[w] && !TEST_BIT (graph->pt_used, w))
- {
- BITMAP_FREE (graph->points_to[w]);
- }
}
/* Indirect nodes get fresh variables. */
if (!TEST_BIT (graph->direct_nodes, n))
@@ -2067,7 +2038,6 @@ label_visit (constraint_graph_t graph, struct scc_info *si, unsigned int n)
graph->points_to[n]);
if (!label)
{
- SET_BIT (graph->pt_used, n);
label = pointer_equiv_class++;
equiv_class_add (pointer_equiv_class_table,
label, graph->points_to[n]);
@@ -2193,10 +2163,8 @@ free_var_substitution_info (struct scc_info *si)
free (graph->loc_label);
free (graph->pointed_by);
free (graph->points_to);
- free (graph->number_incoming);
free (graph->eq_rep);
sbitmap_free (graph->direct_nodes);
- sbitmap_free (graph->pt_used);
htab_delete (pointer_equiv_class_table);
htab_delete (location_equiv_class_table);
bitmap_obstack_release (&iteration_obstack);