]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
reload.c (debug_reload_to_stream): New function.
authorChristian Iseli <Christian.Iseli@lslsun.epfl.ch>
Fri, 17 Oct 1997 15:40:52 +0000 (17:40 +0200)
committerJeff Law <law@gcc.gnu.org>
Fri, 17 Oct 1997 15:40:52 +0000 (09:40 -0600)
        * reload.c (debug_reload_to_stream): New function.  Specify stream
        into which to write debug info.
        (debug_reload): Modify to call debug_reload_to_stream with stderr.
Thanks.  Installed.

From-SVN: r15953

gcc/ChangeLog
gcc/reload.c

index fb1218fac04dc345b590870cdc72344412731e9b..3b2cc6bd3e0020b77ebdb989f41b09bc159a47f8 100644 (file)
@@ -1,3 +1,9 @@
+Fri Oct 17 12:29:48 1997  Christian Iseli  <Christian.Iseli@lslsun.epfl.ch>
+
+       * reload.c (debug_reload_to_stream): New function.  Specify stream
+       into which to write debug info.
+       (debug_reload): Modify to call debug_reload_to_stream with stderr.
+
 Thu Oct 16 15:07:51 1997  Richard Henderson  <rth@cygnus.com>
 
        * combine.c (can_combine_p): Don't combine with an asm whose
index 9f44c42548bb93b88dcc2449c7b24829f15e3b11..4b48a6c317128f392ffe175d90c1dc9c7fafd785 100644 (file)
@@ -6108,86 +6108,95 @@ static char *reload_when_needed_name[] =
 
 static char *reg_class_names[] = REG_CLASS_NAMES;
 
-/* This function is used to print the variables set by 'find_reloads' */
+/* These functions are used to print the variables set by 'find_reloads' */
 
 void
-debug_reload ()
+debug_reload_to_stream (f)
+     FILE *f;
 {
   int r;
   char *prefix;
 
+  if (! f)
+    f = stderr;
   for (r = 0; r < n_reloads; r++)
     {
-      fprintf (stderr, "Reload %d: ", r);
+      fprintf (f, "Reload %d: ", r);
 
       if (reload_in[r] != 0)
        {
-         fprintf (stderr, "reload_in (%s) = ",
+         fprintf (f, "reload_in (%s) = ",
                   GET_MODE_NAME (reload_inmode[r]));
-         print_inline_rtx (stderr, reload_in[r], 24);
-         fprintf (stderr, "\n\t");
+         print_inline_rtx (f, reload_in[r], 24);
+         fprintf (f, "\n\t");
        }
 
       if (reload_out[r] != 0)
        {
-         fprintf (stderr, "reload_out (%s) = ",
+         fprintf (f, "reload_out (%s) = ",
                   GET_MODE_NAME (reload_outmode[r]));
-         print_inline_rtx (stderr, reload_out[r], 24);
-         fprintf (stderr, "\n\t");
+         print_inline_rtx (f, reload_out[r], 24);
+         fprintf (f, "\n\t");
        }
 
-      fprintf (stderr, "%s, ", reg_class_names[(int) reload_reg_class[r]]);
+      fprintf (f, "%s, ", reg_class_names[(int) reload_reg_class[r]]);
 
-      fprintf (stderr, "%s (opnum = %d)",
+      fprintf (f, "%s (opnum = %d)",
               reload_when_needed_name[(int) reload_when_needed[r]],
               reload_opnum[r]);
 
       if (reload_optional[r])
-       fprintf (stderr, ", optional");
+       fprintf (f, ", optional");
 
       if (reload_inc[r] != 0)
-       fprintf (stderr, ", inc by %d", reload_inc[r]);
+       fprintf (f, ", inc by %d", reload_inc[r]);
 
       if (reload_nocombine[r])
-       fprintf (stderr, ", can't combine");
+       fprintf (f, ", can't combine");
 
       if (reload_secondary_p[r])
-       fprintf (stderr, ", secondary_reload_p");
+       fprintf (f, ", secondary_reload_p");
 
       if (reload_in_reg[r] != 0)
        {
-         fprintf (stderr, "\n\treload_in_reg: ");
-         print_inline_rtx (stderr, reload_in_reg[r], 24);
+         fprintf (f, "\n\treload_in_reg: ");
+         print_inline_rtx (f, reload_in_reg[r], 24);
        }
 
       if (reload_reg_rtx[r] != 0)
        {
-         fprintf (stderr, "\n\treload_reg_rtx: ");
-         print_inline_rtx (stderr, reload_reg_rtx[r], 24);
+         fprintf (f, "\n\treload_reg_rtx: ");
+         print_inline_rtx (f, reload_reg_rtx[r], 24);
        }
 
       prefix = "\n\t";
       if (reload_secondary_in_reload[r] != -1)
        {
-         fprintf (stderr, "%ssecondary_in_reload = %d",
+         fprintf (f, "%ssecondary_in_reload = %d",
                   prefix, reload_secondary_in_reload[r]);
          prefix = ", ";
        }
 
       if (reload_secondary_out_reload[r] != -1)
-       fprintf (stderr, "%ssecondary_out_reload = %d\n",
+       fprintf (f, "%ssecondary_out_reload = %d\n",
                 prefix, reload_secondary_out_reload[r]);
 
       prefix = "\n\t";
       if (reload_secondary_in_icode[r] != CODE_FOR_nothing)
        {
-         fprintf (stderr, "%ssecondary_in_icode = %s", prefix, insn_name[r]);
+         fprintf (f, "%ssecondary_in_icode = %s", prefix, insn_name[r]);
          prefix = ", ";
        }
 
       if (reload_secondary_out_icode[r] != CODE_FOR_nothing)
-       fprintf (stderr, "%ssecondary_out_icode = %s", prefix, insn_name[r]);
+       fprintf (f, "%ssecondary_out_icode = %s", prefix, insn_name[r]);
 
-      fprintf (stderr, "\n");
+      fprintf (f, "\n");
     }
 }
+
+void
+debug_reload ()
+{
+  debug_reload_to_stream (stderr);
+}