aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2013-02-04 13:31:28 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2013-02-04 13:31:28 +0000
commit14597080a1f219bd10796c987e4a57ef26627895 (patch)
tree4742f68251bfff2323dad4108e5b30104476afcb /gcc/tree-ssa-structalias.c
parented73881ea9ff3c99389618defe96b814cb952135 (diff)
downloadgcc-14597080a1f219bd10796c987e4a57ef26627895.zip
gcc-14597080a1f219bd10796c987e4a57ef26627895.tar.gz
gcc-14597080a1f219bd10796c987e4a57ef26627895.tar.bz2
re PR middle-end/56188 (FAIL: gcc.dg/ipa/ipa-pta-10.c scan-ipa-dump pta "ESCAPED = { (ESCAPED )?(NONLOCAL )?}")
2013-02-04 Richard Biener <rguenther@suse.de> PR tree-optimization/56188 * tree-ssa-structalias.c (label_visit): Consider case with initially non-empty points-to set. (perform_var_substitution): Dump node mapping and clean up. From-SVN: r195713
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r--gcc/tree-ssa-structalias.c38
1 files changed, 24 insertions, 14 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 50a40a5..31a4c49 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -2101,13 +2101,17 @@ label_visit (constraint_graph_t graph, struct scc_info *si, unsigned int n)
if (graph->points_to[w])
{
- if (first_pred == -1U)
- first_pred = w;
- else if (!graph->points_to[n])
+ if (!graph->points_to[n])
{
- graph->points_to[n] = BITMAP_ALLOC (&predbitmap_obstack);
- bitmap_ior (graph->points_to[n],
- graph->points_to[first_pred], graph->points_to[w]);
+ if (first_pred == -1U)
+ first_pred = w;
+ else
+ {
+ graph->points_to[n] = BITMAP_ALLOC (&predbitmap_obstack);
+ bitmap_ior (graph->points_to[n],
+ graph->points_to[first_pred],
+ graph->points_to[w]);
+ }
}
else
bitmap_ior_into(graph->points_to[n], graph->points_to[w]);
@@ -2231,14 +2235,20 @@ perform_var_substitution (constraint_graph_t graph)
if (dump_file && (dump_flags & TDF_DETAILS))
for (i = 0; i < FIRST_REF_NODE; i++)
{
- bool direct_node = bitmap_bit_p (graph->direct_nodes, i);
- fprintf (dump_file,
- "Equivalence classes for %s node id %d:%s are pointer: %d"
- ", location:%d\n",
- direct_node ? "Direct node" : "Indirect node", i,
- get_varinfo (i)->name,
- graph->pointer_label[si->node_mapping[i]],
- graph->loc_label[si->node_mapping[i]]);
+ unsigned j = si->node_mapping[i];
+ if (j != i)
+ fprintf (dump_file, "%s node id %d (%s) mapped to SCC leader "
+ "node id %d (%s)\n",
+ bitmap_bit_p (graph->direct_nodes, i)
+ ? "Direct" : "Indirect", i, get_varinfo (i)->name,
+ j, get_varinfo (j)->name);
+ else
+ fprintf (dump_file,
+ "Equivalence classes for %s node id %d (%s): pointer %d"
+ ", location %d\n",
+ bitmap_bit_p (graph->direct_nodes, i)
+ ? "direct" : "indirect", i, get_varinfo (i)->name,
+ graph->pointer_label[i], graph->loc_label[i]);
}
/* Quickly eliminate our non-pointer variables. */