Commit 9dbe7947 by Jan Hubicka Committed by Jan Hubicka

invoke.texi (-fdump-unnumbered): Update docs when line number notes are gone.

	* doc/invoke.texi (-fdump-unnumbered): Update docs when line number
	notes are gone.
	* print-rtl.c (flag_dump_unnumbered): Update comments.
	(print_rtl): Fix my previous change.
	* emit-rtl.c (emit_note_before, emit_note_after): Clear out note
	specific data.

From-SVN: r125026
parent 7544f94a
2007-05-24 Jan Hubicka <jh@suse.cz>
* doc/invoke.texi (-fdump-unnumbered): Update docs when line number
notes are gone.
* print-rtl.c (flag_dump_unnumbered): Update comments.
(print_rtl): Fix my previous change.
* emit-rtl.c (emit_note_before, emit_note_after): Clear out note
specific data.
2007-05-24 Zdenek Dvorak <dvorakz@suse.cz> 2007-05-24 Zdenek Dvorak <dvorakz@suse.cz>
PR middle-end/32018 PR middle-end/32018
......
...@@ -4495,7 +4495,7 @@ different text / bss / data / heap / stack / dso start locations. ...@@ -4495,7 +4495,7 @@ different text / bss / data / heap / stack / dso start locations.
@item -fdump-unnumbered @item -fdump-unnumbered
@opindex fdump-unnumbered @opindex fdump-unnumbered
When doing debugging dumps (see @option{-d} option above), suppress instruction When doing debugging dumps (see @option{-d} option above), suppress instruction
numbers, line number note and address output. This makes it more feasible to numbers and address output. This makes it more feasible to
use diff on debugging dumps for compiler invocations with different use diff on debugging dumps for compiler invocations with different
options, in particular with and without @option{-g}. options, in particular with and without @option{-g}.
......
...@@ -3881,6 +3881,7 @@ emit_note_before (enum insn_note subtype, rtx before) ...@@ -3881,6 +3881,7 @@ emit_note_before (enum insn_note subtype, rtx before)
INSN_UID (note) = cur_insn_uid++; INSN_UID (note) = cur_insn_uid++;
NOTE_KIND (note) = subtype; NOTE_KIND (note) = subtype;
BLOCK_FOR_INSN (note) = NULL; BLOCK_FOR_INSN (note) = NULL;
memset (&NOTE_DATA (note), 0, sizeof (NOTE_DATA (note)));
add_insn_before (note, before); add_insn_before (note, before);
return note; return note;
...@@ -4078,6 +4079,7 @@ emit_note_after (enum insn_note subtype, rtx after) ...@@ -4078,6 +4079,7 @@ emit_note_after (enum insn_note subtype, rtx after)
INSN_UID (note) = cur_insn_uid++; INSN_UID (note) = cur_insn_uid++;
NOTE_KIND (note) = subtype; NOTE_KIND (note) = subtype;
BLOCK_FOR_INSN (note) = NULL; BLOCK_FOR_INSN (note) = NULL;
memset (&NOTE_DATA (note), 0, sizeof (NOTE_DATA (note)));
add_insn_after (note, after); add_insn_after (note, after);
return note; return note;
} }
......
...@@ -191,7 +191,7 @@ gendecl (const char *format) ...@@ -191,7 +191,7 @@ gendecl (const char *format)
const char *p; const char *p;
int i, pos; int i, pos;
printf ("extern rtx gen_rtx_fmt_%s\t (RTX_CODE, ", format); printf ("extern rtx gen_rtx_fmt_%s_stat\t (RTX_CODE, ", format);
printf ("enum machine_mode mode"); printf ("enum machine_mode mode");
/* Write each parameter that is needed and start a new line when the line /* Write each parameter that is needed and start a new line when the line
...@@ -208,8 +208,18 @@ gendecl (const char *format) ...@@ -208,8 +208,18 @@ gendecl (const char *format)
printf (" %sarg%d", type_from_format (*p), i++); printf (" %sarg%d", type_from_format (*p), i++);
pos += ourlen; pos += ourlen;
} }
printf (" MEM_STAT_DECL");
printf (");\n"); printf (");\n");
printf ("#define gen_rtx_fmt_%s(c, m", format);
for (p = format, i = 0; *p != 0; p++)
if (*p != '0')
printf (", p%i",i++);
printf (")\\\n gen_rtx_fmt_%s_stat (c, m", format);
for (p = format, i = 0; *p != 0; p++)
if (*p != '0')
printf (", p%i",i++);
printf (" MEM_STAT_INFO)\n\n");
} }
/* Generate macros to generate RTL of code IDX using the functions we /* Generate macros to generate RTL of code IDX using the functions we
...@@ -257,18 +267,18 @@ gendef (const char *format) ...@@ -257,18 +267,18 @@ gendef (const char *format)
/* Start by writing the definition of the function name and the types /* Start by writing the definition of the function name and the types
of the arguments. */ of the arguments. */
printf ("rtx\ngen_rtx_fmt_%s (RTX_CODE code, enum machine_mode mode", format); printf ("rtx\ngen_rtx_fmt_%s_stat (RTX_CODE code, enum machine_mode mode", format);
for (p = format, i = 0; *p != 0; p++) for (p = format, i = 0; *p != 0; p++)
if (*p != '0') if (*p != '0')
printf (",\n\t%sarg%d", type_from_format (*p), i++); printf (",\n\t%sarg%d", type_from_format (*p), i++);
puts (")"); puts (" MEM_STAT_DECL)");
/* Now write out the body of the function itself, which allocates /* Now write out the body of the function itself, which allocates
the memory and initializes it. */ the memory and initializes it. */
puts ("{"); puts ("{");
puts (" rtx rt;"); puts (" rtx rt;");
puts (" rt = rtx_alloc (code);\n"); puts (" rt = rtx_alloc_stat (code PASS_MEM_STAT);\n");
puts (" PUT_MODE (rt, mode);"); puts (" PUT_MODE (rt, mode);");
...@@ -299,6 +309,7 @@ genheader (void) ...@@ -299,6 +309,7 @@ genheader (void)
puts ("#ifndef GCC_GENRTL_H"); puts ("#ifndef GCC_GENRTL_H");
puts ("#define GCC_GENRTL_H\n"); puts ("#define GCC_GENRTL_H\n");
puts ("#include \"statistics.h\"\n");
for (fmt = formats; *fmt; ++fmt) for (fmt = formats; *fmt; ++fmt)
gendecl (*fmt); gendecl (*fmt);
......
...@@ -56,8 +56,8 @@ static void print_rtx (rtx); ...@@ -56,8 +56,8 @@ static void print_rtx (rtx);
the assembly output file. */ the assembly output file. */
const char *print_rtx_head = ""; const char *print_rtx_head = "";
/* Nonzero means suppress output of instruction numbers and line number /* Nonzero means suppress output of instruction numbers
notes in debugging dumps. in debugging dumps.
This must be defined here so that programs like gencodes can be linked. */ This must be defined here so that programs like gencodes can be linked. */
int flag_dump_unnumbered = 0; int flag_dump_unnumbered = 0;
...@@ -705,6 +705,8 @@ debug_rtx_find (rtx x, int uid) ...@@ -705,6 +705,8 @@ debug_rtx_find (rtx x, int uid)
void void
print_rtl (FILE *outf, rtx rtx_first) print_rtl (FILE *outf, rtx rtx_first)
{ {
rtx tmp_rtx;
outfile = outf; outfile = outf;
sawclose = 0; sawclose = 0;
...@@ -722,6 +724,12 @@ print_rtl (FILE *outf, rtx rtx_first) ...@@ -722,6 +724,12 @@ print_rtl (FILE *outf, rtx rtx_first)
case NOTE: case NOTE:
case CODE_LABEL: case CODE_LABEL:
case BARRIER: case BARRIER:
for (tmp_rtx = rtx_first; tmp_rtx != 0; tmp_rtx = NEXT_INSN (tmp_rtx))
{
fputs (print_rtx_head, outfile);
print_rtx (tmp_rtx);
fprintf (outfile, "\n");
}
break; break;
default: default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment