diff mbox

Fix PTA dumping ICEs

Message ID alpine.LNX.2.00.1303271505020.3543@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener March 27, 2013, 2:05 p.m. UTC
This fixes ICEs when dumping PTA pass details (I'm pretty sure
it will not fix PR56716, but this issue is reported there, too).

Bootstrap and regtest running on x86_64-unknown-linux-gnu.

Richard.

2013-03-27  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/56716
	* tree-ssa-structalias.c (perform_var_substitution): Adjust
	dumping for ref nodes.
diff mbox

Patch

Index: gcc/tree-ssa-structalias.c
===================================================================
--- gcc/tree-ssa-structalias.c	(revision 197158)
+++ gcc/tree-ssa-structalias.c	(working copy)
@@ -2292,18 +2292,37 @@  perform_var_substitution (constraint_gra
       {
 	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);
+	  {
+	    fprintf (dump_file, "%s node id %d ",
+		     bitmap_bit_p (graph->direct_nodes, i)
+		     ? "Direct" : "Indirect", i);
+	    if (i < FIRST_REF_NODE)
+	      fprintf (dump_file, "\"%s\"", get_varinfo (i)->name);
+	    else
+	      fprintf (dump_file, "\"*%s\"",
+		       get_varinfo (i - FIRST_REF_NODE)->name);
+	    fprintf (dump_file, " mapped to SCC leader node id %d ", j);
+	    if (j < FIRST_REF_NODE)
+	      fprintf (dump_file, "\"%s\"\n", get_varinfo (j)->name);
+	    else
+	      fprintf (dump_file, "\"*%s\"\n",
+		       get_varinfo (j - FIRST_REF_NODE)->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]);
+	  {
+	    fprintf (dump_file,
+		     "Equivalence classes for %s node id %d ",
+		     bitmap_bit_p (graph->direct_nodes, i)
+		     ? "direct" : "indirect", i);
+	    if (i < FIRST_REF_NODE)
+	      fprintf (dump_file, "\"%s\"", get_varinfo (i)->name);
+	    else
+	      fprintf (dump_file, "\"*%s\"",
+		       get_varinfo (i - FIRST_REF_NODE)->name);
+	    fprintf (dump_file,
+		     ": pointer %d, location %d\n",
+		     graph->pointer_label[i], graph->loc_label[i]);
+	  }
       }
 
   /* Quickly eliminate our non-pointer variables.  */