aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ"orn Rennecke <amylaar@cygnus.co.uk>1998-10-06 09:03:38 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>1998-10-06 10:03:38 +0100
commitb707b4509b0eb1b31919e724ef778a9b210a90b0 (patch)
treed886cd126771423714dea20b8ad27de6d6273fa0
parent87603ed0ee7dd6667ca5098dffb08a120435f713 (diff)
downloadgcc-b707b4509b0eb1b31919e724ef778a9b210a90b0.zip
gcc-b707b4509b0eb1b31919e724ef778a9b210a90b0.tar.gz
gcc-b707b4509b0eb1b31919e724ef778a9b210a90b0.tar.bz2
Cleanup for -fdump-unnumbered:
* flags.h (flag_dump_unnumbered): Declare. * toplev.c (flag_dump_unnumbered): Don't declare. * print-rtl.c (flags.h): Include. (print_rtl_single): Add return value. * rtl.h (print_rtl_single): Update declaration. * flow.c (flag_dump_unnumbered): Don't declare. (print_rtl_with_bb): Use return value of print_rtl_single. From-SVN: r22865
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/flags.h5
-rw-r--r--gcc/flow.c8
-rw-r--r--gcc/invoke.texi8
-rw-r--r--gcc/print-rtl.c10
-rw-r--r--gcc/rtl.h2
-rw-r--r--gcc/toplev.c2
7 files changed, 36 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e50a261..f316ada 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+Tue Oct 6 17:00:42 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * flags.h (flag_dump_unnumbered): Declare.
+ * toplev.c (flag_dump_unnumbered): Don't declare.
+ * print-rtl.c (flags.h): Include.
+ (print_rtl_single): Add return value.
+ * rtl.h (print_rtl_single): Update declaration.
+ * flow.c (flag_dump_unnumbered): Don't declare.
+ (print_rtl_with_bb): Use return value of print_rtl_single.
+
Tue Oct 6 01:36:00 1998 Bernd Schmidt <crux@Pool.Informatik.RWTH-Aachen.DE>
* Makefile.in (stupid.o): Update dependencies.
diff --git a/gcc/flags.h b/gcc/flags.h
index a403750..3b7dd5ee3 100644
--- a/gcc/flags.h
+++ b/gcc/flags.h
@@ -356,6 +356,11 @@ extern int flag_branch_on_count_reg;
extern int flag_delayed_branch;
+/* Nonzero means suppress output of instruction numbers and line number
+ notes in debugging dumps. */
+
+extern int flag_dump_unnumbered;
+
/* Nonzero means pretend it is OK to examine bits of target floats,
even if that isn't true. The resulting code will have incorrect constants,
but the same series of instructions that the native compiler would make. */
diff --git a/gcc/flow.c b/gcc/flow.c
index f963c10..d602436 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -3171,7 +3171,6 @@ print_rtl_with_bb (outf, rtx_first)
FILE *outf;
rtx rtx_first;
{
- extern int flag_dump_unnumbered;
register rtx tmp_rtx;
if (rtx_first == 0)
@@ -3209,6 +3208,8 @@ print_rtl_with_bb (outf, rtx_first)
for (tmp_rtx = rtx_first; NULL != tmp_rtx; tmp_rtx = NEXT_INSN (tmp_rtx))
{
+ int did_output;
+
if ((bb = start[INSN_UID (tmp_rtx)]) >= 0)
{
fprintf (outf, ";; Start of basic block %d, registers live:",
@@ -3231,13 +3232,12 @@ print_rtl_with_bb (outf, rtx_first)
else if (in_bb_p[ INSN_UID(tmp_rtx)] == IN_MULTIPLE_BB)
fprintf (outf, ";; Insn is in multiple basic blocks\n");
- print_rtl_single (outf, tmp_rtx);
+ did_output = print_rtl_single (outf, tmp_rtx);
if ((bb = end[INSN_UID (tmp_rtx)]) >= 0)
fprintf (outf, ";; End of basic block %d\n", bb);
- if (! flag_dump_unnumbered
- || GET_CODE (tmp_rtx) != NOTE || NOTE_LINE_NUMBER (tmp_rtx) < 0)
+ if (did_output)
putc ('\n', outf);
}
}
diff --git a/gcc/invoke.texi b/gcc/invoke.texi
index 1bf0454..d0339e4 100644
--- a/gcc/invoke.texi
+++ b/gcc/invoke.texi
@@ -136,7 +136,7 @@ in the following sections.
@item Debugging Options
@xref{Debugging Options,,Options for Debugging Your Program or GCC}.
@smallexample
--a -ax -d@var{letters} -fpretend-float
+-a -ax -d@var{letters} -fdump-unnumbered -fpretend-float
-fprofile-arcs -ftest-coverage
-g -g@var{level} -gcoff -gdwarf -gdwarf-1 -gdwarf-1+ -gdwarf-2
-ggdb -gstabs -gstabs+ -gxcoff -gxcoff+
@@ -2033,6 +2033,12 @@ Dump debugging information during parsing, to standard error.
Annotate the assembler output with miscellaneous debugging information.
@end table
+@item -fdump-unnumbered
+When doing debugging dumps (see -d option above), suppress instruction
+numbers and line number note output. This makes it more feasible to
+use diff on debugging dumps for compiler invokations with different
+options, in particular with and without -g.
+
@item -fpretend-float
When running a cross-compiler, pretend that the target machine uses the
same floating point format as the host machine. This causes incorrect
diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c
index 415a2cc..e3b36fe 100644
--- a/gcc/print-rtl.c
+++ b/gcc/print-rtl.c
@@ -24,6 +24,7 @@ Boston, MA 02111-1307, USA. */
#include "rtl.h"
#include "bitmap.h"
#include "real.h"
+#include "flags.h"
/* How to print out a register name.
@@ -54,7 +55,11 @@ static int indent;
extern char **insn_name_ptr;
+/* Nonzero means suppress output of instruction numbers and line number
+ notes in debugging dumps.
+ This must be defined here so that programs like gencodes can be linked. */
int flag_dump_unnumbered = 0;
+
/* Print IN_RTX onto OUTFILE. This is the recursive part of printing. */
static void
@@ -409,8 +414,9 @@ print_rtl (outf, rtx_first)
}
/* Like print_rtx, except specify a file. */
+/* Return nonzero if we actually printed anything. */
-void
+int
print_rtl_single (outf, x)
FILE *outf;
rtx x;
@@ -422,5 +428,7 @@ print_rtl_single (outf, x)
{
print_rtx (x);
putc ('\n', outf);
+ return 1;
}
+ return 0;
}
diff --git a/gcc/rtl.h b/gcc/rtl.h
index dc432f3..18751bb 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1344,7 +1344,7 @@ extern void debug_rtx_list PROTO ((rtx, int));
extern rtx debug_rtx_find PROTO ((rtx, int));
#ifdef BUFSIZ
extern void print_rtl PROTO ((FILE *, rtx));
-extern void print_rtl_single PROTO ((FILE *, rtx));
+extern int print_rtl_single PROTO ((FILE *, rtx));
extern void print_inline_rtx PROTO ((FILE *, rtx, int));
#endif
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 6ca6b93..7193cec 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -725,8 +725,6 @@ int flag_argument_noalias = 0;
if alias analysis (in general) is enabled. */
int flag_strict_aliasing = 0;
-extern int flag_dump_unnumbered;
-
/* Instrument functions with calls at entry and exit, for profiling. */
int flag_instrument_function_entry_exit = 0;