]> gcc.gnu.org Git - gcc.git/commitdiff
Improve uninit pass dumping
authorRichard Biener <rguenther@suse.de>
Tue, 30 Aug 2022 12:36:39 +0000 (14:36 +0200)
committerRichard Biener <rguenther@suse.de>
Tue, 30 Aug 2022 13:38:19 +0000 (15:38 +0200)
This produces less redundancy and more complete info dumping
the control dependence chains.

* gimple-predicate-analysis.cc (format_edge_vec): Dump
both source and destination.
(dump_dep_chains): Remove.
(uninit_analysis::init_use_preds): Remove redundant
dumping of chains.

gcc/gimple-predicate-analysis.cc

index f8c63d24537a1d83aac28def6a4b51ed3dbbdb65..068196cb1579aa8b39e2226afac00e37cc0da40d 100644 (file)
@@ -122,10 +122,10 @@ format_edge_vec (const vec<edge> &ev)
     {
       char es[32];
       const_edge e = ev[i];
-      sprintf (es, "%u", e->src->index);
+      sprintf (es, "%u -> %u", e->src->index, e->dest->index);
       str += es;
       if (i + 1 < n)
-       str += " -> ";
+       str += ", ";
     }
   return str;
 }
@@ -180,28 +180,6 @@ dump_pred_chain (const pred_chain &chain)
     }
 }
 
-/* Dump the first NCHAINS elements of the DEP_CHAINS array into DUMP_FILE.  */
-
-static void
-dump_dep_chains (const auto_vec<edge> dep_chains[], unsigned nchains)
-{
-  if (!dump_file)
-    return;
-
-  for (unsigned i = 0; i != nchains; ++i)
-    {
-      const auto_vec<edge> &v = dep_chains[i];
-      unsigned n = v.length ();
-      for (unsigned j = 0; j != n; ++j)
-       {
-         fprintf (dump_file, "%u", v[j]->src->index);
-         if (j + 1 < n)
-           fprintf (dump_file, " -> ");
-       }
-      fputc ('\n', dump_file);
-    }
-}
-
 /* Return the 'normalized' conditional code with operand swapping
    and condition inversion controlled by SWAP_COND and INVERT.  */
 
@@ -1940,12 +1918,8 @@ uninit_analysis::init_use_preds (predicate &use_preds, basic_block def_bb,
     }
 
   if (DEBUG_PREDICATE_ANALYZER && dump_file)
-    {
-      fprintf (dump_file, "predicate::predicate (def_bb = %u, use_bb = %u, func_t) "
-              "initialized from %u dep_chains:\n\t",
-              def_bb->index, use_bb->index, num_chains);
-      dump_dep_chains (dep_chains, num_chains);
-    }
+    fprintf (dump_file, "init_use_preds (def_bb = %u, use_bb = %u)\n",
+            def_bb->index, use_bb->index);
 
   /* From the set of edges computed above initialize *THIS as the OR
      condition under which the definition in DEF_BB is used in USE_BB.
This page took 0.063419 seconds and 5 git commands to generate.