rtl.h (print_simple_rtl): New.
* rtl.h (print_simple_rtl): New. * print-rtl.c (print_simple_rtl): New. (flag_simple): New. (print_rtx): Disable printing of flags and modes, etc., if `flag_simple` nonzero. From-SVN: r38730
This commit is contained in:
parent
b05467dc15
commit
75b7557d49
@ -1,3 +1,11 @@
|
|||||||
|
2001-01-06 Michael Hayes <mhayes@redhat.com>
|
||||||
|
|
||||||
|
* rtl.h (print_simple_rtl): New.
|
||||||
|
* print-rtl.c (print_simple_rtl): New.
|
||||||
|
(flag_simple): New.
|
||||||
|
(print_rtx): Disable printing of flags and modes, etc.,
|
||||||
|
if `flag_simple` nonzero.
|
||||||
|
|
||||||
2001-01-05 Zack Weinberg <zack@wolery.stanford.edu>
|
2001-01-05 Zack Weinberg <zack@wolery.stanford.edu>
|
||||||
|
|
||||||
* function.c (fixup_var_refs): Use push_to_full_sequence where
|
* function.c (fixup_var_refs): Use push_to_full_sequence where
|
||||||
|
@ -65,6 +65,9 @@ const char *print_rtx_head = "";
|
|||||||
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;
|
||||||
|
|
||||||
|
/* Nonzero means use simplified format without flags, modes, etc. */
|
||||||
|
int flag_simple = 0;
|
||||||
|
|
||||||
/* Nonzero if we are dumping graphical description. */
|
/* Nonzero if we are dumping graphical description. */
|
||||||
int dump_for_graph;
|
int dump_for_graph;
|
||||||
|
|
||||||
@ -85,6 +88,9 @@ print_rtx (in_rtx)
|
|||||||
|
|
||||||
if (sawclose)
|
if (sawclose)
|
||||||
{
|
{
|
||||||
|
if (flag_simple)
|
||||||
|
fputc (' ', outfile);
|
||||||
|
else
|
||||||
fprintf (outfile, "\n%s%s",
|
fprintf (outfile, "\n%s%s",
|
||||||
print_rtx_head,
|
print_rtx_head,
|
||||||
(xspaces + (sizeof xspaces - 1 - indent * 2)));
|
(xspaces + (sizeof xspaces - 1 - indent * 2)));
|
||||||
@ -112,8 +118,13 @@ print_rtx (in_rtx)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* print name of expression code */
|
/* print name of expression code */
|
||||||
|
if (flag_simple && GET_CODE (in_rtx) == CONST_INT)
|
||||||
|
fputc ('(', outfile);
|
||||||
|
else
|
||||||
fprintf (outfile, "(%s", GET_RTX_NAME (GET_CODE (in_rtx)));
|
fprintf (outfile, "(%s", GET_RTX_NAME (GET_CODE (in_rtx)));
|
||||||
|
|
||||||
|
if (! flag_simple)
|
||||||
|
{
|
||||||
if (in_rtx->in_struct)
|
if (in_rtx->in_struct)
|
||||||
fputs ("/s", outfile);
|
fputs ("/s", outfile);
|
||||||
|
|
||||||
@ -138,12 +149,15 @@ print_rtx (in_rtx)
|
|||||||
if (GET_MODE (in_rtx) != VOIDmode)
|
if (GET_MODE (in_rtx) != VOIDmode)
|
||||||
{
|
{
|
||||||
/* Print REG_NOTE names for EXPR_LIST and INSN_LIST. */
|
/* Print REG_NOTE names for EXPR_LIST and INSN_LIST. */
|
||||||
if (GET_CODE (in_rtx) == EXPR_LIST || GET_CODE (in_rtx) == INSN_LIST)
|
if (GET_CODE (in_rtx) == EXPR_LIST
|
||||||
fprintf (outfile, ":%s", GET_REG_NOTE_NAME (GET_MODE (in_rtx)));
|
|| GET_CODE (in_rtx) == INSN_LIST)
|
||||||
|
fprintf (outfile, ":%s",
|
||||||
|
GET_REG_NOTE_NAME (GET_MODE (in_rtx)));
|
||||||
else
|
else
|
||||||
fprintf (outfile, ":%s", GET_MODE_NAME (GET_MODE (in_rtx)));
|
fprintf (outfile, ":%s", GET_MODE_NAME (GET_MODE (in_rtx)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Get the format string and skip the first elements if we have handled
|
/* Get the format string and skip the first elements if we have handled
|
||||||
them already. */
|
them already. */
|
||||||
@ -296,11 +310,15 @@ print_rtx (in_rtx)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'w':
|
case 'w':
|
||||||
|
if (! flag_simple)
|
||||||
fprintf (outfile, " ");
|
fprintf (outfile, " ");
|
||||||
fprintf (outfile, HOST_WIDE_INT_PRINT_DEC, XWINT (in_rtx, i));
|
fprintf (outfile, HOST_WIDE_INT_PRINT_DEC, XWINT (in_rtx, i));
|
||||||
|
if (! flag_simple)
|
||||||
|
{
|
||||||
fprintf (outfile, " [");
|
fprintf (outfile, " [");
|
||||||
fprintf (outfile, HOST_WIDE_INT_PRINT_HEX, XWINT (in_rtx, i));
|
fprintf (outfile, HOST_WIDE_INT_PRINT_HEX, XWINT (in_rtx, i));
|
||||||
fprintf (outfile, "]");
|
fprintf (outfile, "]");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'i':
|
case 'i':
|
||||||
@ -663,3 +681,17 @@ print_rtl_single (outf, x)
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Like print_rtl except without all the detail; for example,
|
||||||
|
if RTX is a CONST_INT then print in decimal format. */
|
||||||
|
|
||||||
|
void
|
||||||
|
print_simple_rtl (outf, x)
|
||||||
|
FILE *outf;
|
||||||
|
rtx x;
|
||||||
|
{
|
||||||
|
flag_simple = 1;
|
||||||
|
print_rtl (outf, x);
|
||||||
|
flag_simple = 0;
|
||||||
|
}
|
||||||
|
@ -1778,6 +1778,7 @@ extern void debug_rtx_range PARAMS ((rtx, rtx));
|
|||||||
extern rtx debug_rtx_find PARAMS ((rtx, int));
|
extern rtx debug_rtx_find PARAMS ((rtx, int));
|
||||||
#ifdef BUFSIZ
|
#ifdef BUFSIZ
|
||||||
extern void print_rtl PARAMS ((FILE *, rtx));
|
extern void print_rtl PARAMS ((FILE *, rtx));
|
||||||
|
extern void print_simple_rtl PARAMS ((FILE *, rtx));
|
||||||
extern int print_rtl_single PARAMS ((FILE *, rtx));
|
extern int print_rtl_single PARAMS ((FILE *, rtx));
|
||||||
extern void print_inline_rtx PARAMS ((FILE *, rtx, int));
|
extern void print_inline_rtx PARAMS ((FILE *, rtx, int));
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user