summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/common.opt4
-rw-r--r--gcc/doc/invoke.texi8
-rw-r--r--gcc/print-rtl.c10
4 files changed, 27 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0b96e705eed..c84f1a6a434 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2009-06-02 Alexandre Oliva <aoliva@redhat.com>
+
+ * common.opt (fdump-unnumbered-links): New.
+ * doc/invoke.texi (-fdump-unnumbered-links): Document it.
+ * print-rtl.c (flag_dump_unnumbered_links): New.
+ (print_rtx): Test it.
+
2009-06-02 Richard Earnshaw <rearnsha@arm.com>
* arm.c (arm_get_frame_offsets): Prefer using r3 for padding a
diff --git a/gcc/common.opt b/gcc/common.opt
index d3cbe169332..ee7e0bd7cea 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -462,6 +462,10 @@ fdwarf2-cfi-asm
Common Report Var(flag_dwarf2_cfi_asm) Init(HAVE_GAS_CFI_DIRECTIVE)
Enable CFI tables via GAS assembler directives.
+fdump-unnumbered-links
+Common Report Var(flag_dump_unnumbered_links) VarExists
+Suppress output of previous and next insn numbers in debugging dumps
+
fearly-inlining
Common Report Var(flag_early_inlining) Init(1) Optimization
Perform early inlining
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 85b3ae8dfb0..eded92e47f8 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -275,7 +275,7 @@ Objective-C and Objective-C++ Dialects}.
@xref{Debugging Options,,Options for Debugging Your Program or GCC}.
@gccoptlist{-d@var{letters} -dumpspecs -dumpmachine -dumpversion @gol
-fdbg-cnt-list -fdbg-cnt=@var{counter-value-list} @gol
--fdump-noaddr -fdump-unnumbered @gol
+-fdump-noaddr -fdump-unnumbered -fdump-unnumbered-links @gol
-fdump-translation-unit@r{[}-@var{n}@r{]} @gol
-fdump-class-hierarchy@r{[}-@var{n}@r{]} @gol
-fdump-ipa-all -fdump-ipa-cgraph -fdump-ipa-inline @gol
@@ -4942,6 +4942,12 @@ This makes it more feasible to use diff on debugging dumps for compiler
invocations with different options, in particular with and without
@option{-g}.
+@item -fdump-unnumbered-links
+@opindex fdump-unnumbered-links
+When doing debugging dumps (see @option{-d} option above), suppress
+instruction numbers for the links to the previous and next instructions
+in a sequence.
+
@item -fdump-translation-unit @r{(C++ only)}
@itemx -fdump-translation-unit-@var{options} @r{(C++ only)}
@opindex fdump-translation-unit
diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c
index 393ffe94e20..e519728abff 100644
--- a/gcc/print-rtl.c
+++ b/gcc/print-rtl.c
@@ -60,6 +60,11 @@ const char *print_rtx_head = "";
This must be defined here so that programs like gencodes can be linked. */
int flag_dump_unnumbered = 0;
+/* Nonzero means suppress output of instruction numbers for previous
+ and next insns in debugging dumps.
+ This must be defined here so that programs like gencodes can be linked. */
+int flag_dump_unnumbered_links = 0;
+
/* Nonzero means use simplified format without flags, modes, etc. */
int flag_simple = 0;
@@ -493,7 +498,10 @@ print_rtx (const_rtx in_rtx)
goto do_e;
}
- if (flag_dump_unnumbered)
+ if (flag_dump_unnumbered
+ || (flag_dump_unnumbered_links && (i == 1 || i == 2)
+ && (INSN_P (in_rtx) || NOTE_P (in_rtx)
+ || LABEL_P (in_rtx) || BARRIER_P (in_rtx))))
fputs (" #", outfile);
else
fprintf (outfile, " %d", INSN_UID (sub));