public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-3332] Improve path_range_query dumps.
@ 2021-09-03 13:31 Aldy Hernandez
  0 siblings, 0 replies; only message in thread
From: Aldy Hernandez @ 2021-09-03 13:31 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:134289146468b0b7215159d1940a674e1c3b228e

commit r12-3332-g134289146468b0b7215159d1940a674e1c3b228e
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Fri Sep 3 11:13:16 2021 +0200

    Improve path_range_query dumps.
    
    Tested on x86-64 Linux.
    
    gcc/ChangeLog:
    
            * gimple-range-path.cc (path_range_query::dump): Dump path
            length.
            (path_range_query::precompute_ranges): Dump entire path.

Diff:
---
 gcc/gimple-range-path.cc | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/gcc/gimple-range-path.cc b/gcc/gimple-range-path.cc
index 77b823e7bd5..6d6e5eb6635 100644
--- a/gcc/gimple-range-path.cc
+++ b/gcc/gimple-range-path.cc
@@ -92,7 +92,7 @@ path_range_query::dump (FILE *dump_file)
   bitmap_iterator bi;
   extern void dump_ranger (FILE *, const vec<basic_block> &);
 
-  fprintf (dump_file, "Path is:\n");
+  fprintf (dump_file, "Path is (length=%d):\n", m_path->length ());
   dump_ranger (dump_file, *m_path);
 
   fprintf (dump_file, "Imports:\n");
@@ -315,7 +315,17 @@ path_range_query::precompute_ranges (const vec<basic_block> &path,
   m_imports = imports;
 
   if (DEBUG_SOLVER)
-    fprintf (dump_file, "path_range_query: precompute_ranges\n");
+    {
+      fprintf (dump_file, "\npath_range_query: precompute_ranges for path: ");
+      for (unsigned i = path.length (); i > 0; --i)
+	{
+	  basic_block bb = path[i - 1];
+	  fprintf (dump_file, "BB %d", bb->index);
+	  if (i > 1)
+	    fprintf (dump_file, ", ");
+	}
+      fprintf (dump_file, "\n");
+    }
 
   while (1)
     {


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-03 13:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-03 13:31 [gcc r12-3332] Improve path_range_query dumps Aldy Hernandez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).