Commit 3dc21182 by Daniel Berlin Committed by Richard Biener

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
parent 1dbc1ae7
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.
2008-11-25 Vladimir Makarov <vmakarov@redhat.com>
* doc/invoke.texi (ira-max-loops-num): Change semantics.
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment