Fix date in last entry.
[official-gcc.git] / gcc / print-rtl.c
blob4c159f123bf8e3f01c41797dffa9c2ac658cf44f
1 /* Print RTL for GNU C Compiler.
2 Copyright (C) 1987, 1988, 1992, 1997, 1998, 1999, 2000, 2002, 2003
3 Free Software Foundation, Inc.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
10 version.
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING. If not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA. */
23 #include "config.h"
24 #include "system.h"
25 #include "coretypes.h"
26 #include "tm.h"
27 #include "rtl.h"
29 /* We don't want the tree code checking code for the access to the
30 DECL_NAME to be included in the gen* programs. */
31 #undef ENABLE_TREE_CHECKING
32 #include "tree.h"
33 #include "real.h"
34 #include "flags.h"
35 #include "hard-reg-set.h"
36 #include "basic-block.h"
38 /* How to print out a register name.
39 We don't use PRINT_REG because some definitions of PRINT_REG
40 don't work here. */
41 #ifndef DEBUG_PRINT_REG
42 #define DEBUG_PRINT_REG(RTX, CODE, FILE) \
43 fprintf ((FILE), "%d %s", REGNO (RTX), reg_names[REGNO (RTX)])
44 #endif
46 /* Array containing all of the register names */
48 #ifdef DEBUG_REGISTER_NAMES
49 static const char * const debug_reg_names[] = DEBUG_REGISTER_NAMES;
50 #define reg_names debug_reg_names
51 #else
52 const char * reg_names[] = REGISTER_NAMES;
53 #endif
55 static FILE *outfile;
57 static int sawclose = 0;
59 static int indent;
61 static void print_rtx PARAMS ((rtx));
63 /* String printed at beginning of each RTL when it is dumped.
64 This string is set to ASM_COMMENT_START when the RTL is dumped in
65 the assembly output file. */
66 const char *print_rtx_head = "";
68 /* Nonzero means suppress output of instruction numbers and line number
69 notes in debugging dumps.
70 This must be defined here so that programs like gencodes can be linked. */
71 int flag_dump_unnumbered = 0;
73 /* Nonzero means use simplified format without flags, modes, etc. */
74 int flag_simple = 0;
76 /* Nonzero if we are dumping graphical description. */
77 int dump_for_graph;
79 /* Nonzero to dump all call_placeholder alternatives. */
80 static int debug_call_placeholder_verbose;
82 void
83 print_mem_expr (outfile, expr)
84 FILE *outfile;
85 tree expr;
87 if (TREE_CODE (expr) == COMPONENT_REF)
89 if (TREE_OPERAND (expr, 0))
90 print_mem_expr (outfile, TREE_OPERAND (expr, 0));
91 else
92 fputs (" <variable>", outfile);
93 if (DECL_NAME (TREE_OPERAND (expr, 1)))
94 fprintf (outfile, ".%s",
95 IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (expr, 1))));
97 else if (TREE_CODE (expr) == INDIRECT_REF)
99 fputs (" (*", outfile);
100 print_mem_expr (outfile, TREE_OPERAND (expr, 0));
101 fputs (")", outfile);
103 else if (DECL_NAME (expr))
104 fprintf (outfile, " %s", IDENTIFIER_POINTER (DECL_NAME (expr)));
105 else if (TREE_CODE (expr) == RESULT_DECL)
106 fputs (" <result>", outfile);
107 else
108 fputs (" <anonymous>", outfile);
111 /* Print IN_RTX onto OUTFILE. This is the recursive part of printing. */
113 static void
114 print_rtx (in_rtx)
115 rtx in_rtx;
117 int i = 0;
118 int j;
119 const char *format_ptr;
120 int is_insn;
121 rtx tem;
123 if (sawclose)
125 if (flag_simple)
126 fputc (' ', outfile);
127 else
128 fprintf (outfile, "\n%s%*s", print_rtx_head, indent * 2, "");
129 sawclose = 0;
132 if (in_rtx == 0)
134 fputs ("(nil)", outfile);
135 sawclose = 1;
136 return;
138 else if (GET_CODE (in_rtx) > NUM_RTX_CODE)
140 fprintf (outfile, "(??? bad code %d\n)", GET_CODE (in_rtx));
141 sawclose = 1;
142 return;
145 is_insn = INSN_P (in_rtx);
147 /* When printing in VCG format we write INSNs, NOTE, LABEL, and BARRIER
148 in separate nodes and therefore have to handle them special here. */
149 if (dump_for_graph
150 && (is_insn || GET_CODE (in_rtx) == NOTE
151 || GET_CODE (in_rtx) == CODE_LABEL || GET_CODE (in_rtx) == BARRIER))
153 i = 3;
154 indent = 0;
156 else
158 /* Print name of expression code. */
159 if (flag_simple && GET_CODE (in_rtx) == CONST_INT)
160 fputc ('(', outfile);
161 else
162 fprintf (outfile, "(%s", GET_RTX_NAME (GET_CODE (in_rtx)));
164 if (! flag_simple)
166 if (RTX_FLAG (in_rtx, in_struct))
167 fputs ("/s", outfile);
169 if (RTX_FLAG (in_rtx, volatil))
170 fputs ("/v", outfile);
172 if (RTX_FLAG (in_rtx, unchanging))
173 fputs ("/u", outfile);
175 if (RTX_FLAG (in_rtx, integrated))
176 fputs ("/i", outfile);
178 if (RTX_FLAG (in_rtx, frame_related))
179 fputs ("/f", outfile);
181 if (RTX_FLAG (in_rtx, jump))
182 fputs ("/j", outfile);
184 if (RTX_FLAG (in_rtx, call))
185 fputs ("/c", outfile);
187 if (GET_MODE (in_rtx) != VOIDmode)
189 /* Print REG_NOTE names for EXPR_LIST and INSN_LIST. */
190 if (GET_CODE (in_rtx) == EXPR_LIST
191 || GET_CODE (in_rtx) == INSN_LIST)
192 fprintf (outfile, ":%s",
193 GET_REG_NOTE_NAME (GET_MODE (in_rtx)));
194 else
195 fprintf (outfile, ":%s", GET_MODE_NAME (GET_MODE (in_rtx)));
200 #ifndef GENERATOR_FILE
201 if (GET_CODE (in_rtx) == CONST_DOUBLE && FLOAT_MODE_P (GET_MODE (in_rtx)))
202 i = 5;
203 #endif
205 /* Get the format string and skip the first elements if we have handled
206 them already. */
207 format_ptr = GET_RTX_FORMAT (GET_CODE (in_rtx)) + i;
208 for (; i < GET_RTX_LENGTH (GET_CODE (in_rtx)); i++)
209 switch (*format_ptr++)
211 const char *str;
213 case 'T':
214 str = XTMPL (in_rtx, i);
215 goto string;
217 case 'S':
218 case 's':
219 str = XSTR (in_rtx, i);
220 string:
222 if (str == 0)
223 fputs (dump_for_graph ? " \\\"\\\"" : " \"\"", outfile);
224 else
226 if (dump_for_graph)
227 fprintf (outfile, " (\\\"%s\\\")", str);
228 else
229 fprintf (outfile, " (\"%s\")", str);
231 sawclose = 1;
232 break;
234 /* 0 indicates a field for internal use that should not be printed.
235 An exception is the third field of a NOTE, where it indicates
236 that the field has several different valid contents. */
237 case '0':
238 if (i == 1 && GET_CODE (in_rtx) == REG)
240 if (REGNO (in_rtx) != ORIGINAL_REGNO (in_rtx))
241 fprintf (outfile, " [%d]", ORIGINAL_REGNO (in_rtx));
243 #ifndef GENERATOR_FILE
244 else if (i == 1 && GET_CODE (in_rtx) == SYMBOL_REF)
246 int flags = SYMBOL_REF_FLAGS (in_rtx);
247 if (flags)
248 fprintf (outfile, " [flags 0x%x]", flags);
250 else if (i == 2 && GET_CODE (in_rtx) == SYMBOL_REF)
252 tree decl = SYMBOL_REF_DECL (in_rtx);
253 if (decl)
254 print_node_brief (outfile, "", decl, 0);
256 #endif
257 else if (i == 4 && GET_CODE (in_rtx) == NOTE)
259 switch (NOTE_LINE_NUMBER (in_rtx))
261 case NOTE_INSN_EH_REGION_BEG:
262 case NOTE_INSN_EH_REGION_END:
263 if (flag_dump_unnumbered)
264 fprintf (outfile, " #");
265 else
266 fprintf (outfile, " %d", NOTE_EH_HANDLER (in_rtx));
267 sawclose = 1;
268 break;
270 case NOTE_INSN_BLOCK_BEG:
271 case NOTE_INSN_BLOCK_END:
272 fprintf (outfile, " ");
273 if (flag_dump_unnumbered)
274 fprintf (outfile, "#");
275 else
276 fprintf (outfile, HOST_PTR_PRINTF,
277 (char *) NOTE_BLOCK (in_rtx));
278 sawclose = 1;
279 break;
281 case NOTE_INSN_BASIC_BLOCK:
283 basic_block bb = NOTE_BASIC_BLOCK (in_rtx);
284 if (bb != 0)
285 fprintf (outfile, " [bb %d]", bb->index);
286 break;
289 case NOTE_INSN_EXPECTED_VALUE:
290 indent += 2;
291 if (!sawclose)
292 fprintf (outfile, " ");
293 print_rtx (NOTE_EXPECTED_VALUE (in_rtx));
294 indent -= 2;
295 break;
297 case NOTE_INSN_DELETED_LABEL:
298 if (NOTE_SOURCE_FILE (in_rtx))
299 fprintf (outfile, " (\"%s\")", NOTE_SOURCE_FILE (in_rtx));
300 else
301 fprintf (outfile, " \"\"");
302 break;
304 case NOTE_INSN_PREDICTION:
305 if (NOTE_PREDICTION (in_rtx))
306 fprintf (outfile, " [ %d %d ] ",
307 (int)NOTE_PREDICTION_ALG (in_rtx),
308 (int) NOTE_PREDICTION_FLAGS (in_rtx));
309 else
310 fprintf (outfile, " [ ERROR ]");
311 break;
313 default:
315 const char * const str = X0STR (in_rtx, i);
317 if (NOTE_LINE_NUMBER (in_rtx) < 0)
319 else if (str == 0)
320 fputs (dump_for_graph ? " \\\"\\\"" : " \"\"", outfile);
321 else
323 if (dump_for_graph)
324 fprintf (outfile, " (\\\"%s\\\")", str);
325 else
326 fprintf (outfile, " (\"%s\")", str);
328 break;
332 break;
334 case 'e':
335 do_e:
336 indent += 2;
337 if (!sawclose)
338 fprintf (outfile, " ");
339 print_rtx (XEXP (in_rtx, i));
340 indent -= 2;
341 break;
343 case 'E':
344 case 'V':
345 indent += 2;
346 if (sawclose)
348 fprintf (outfile, "\n%s%*s",
349 print_rtx_head, indent * 2, "");
350 sawclose = 0;
352 fputs (" [", outfile);
353 if (NULL != XVEC (in_rtx, i))
355 indent += 2;
356 if (XVECLEN (in_rtx, i))
357 sawclose = 1;
359 for (j = 0; j < XVECLEN (in_rtx, i); j++)
360 print_rtx (XVECEXP (in_rtx, i, j));
362 indent -= 2;
364 if (sawclose)
365 fprintf (outfile, "\n%s%*s", print_rtx_head, indent * 2, "");
367 fputs ("]", outfile);
368 sawclose = 1;
369 indent -= 2;
370 break;
372 case 'w':
373 if (! flag_simple)
374 fprintf (outfile, " ");
375 fprintf (outfile, HOST_WIDE_INT_PRINT_DEC, XWINT (in_rtx, i));
376 if (! flag_simple)
378 fprintf (outfile, " [");
379 fprintf (outfile, HOST_WIDE_INT_PRINT_HEX, XWINT (in_rtx, i));
380 fprintf (outfile, "]");
382 break;
384 case 'i':
385 if (i == 6 && GET_CODE (in_rtx) == NOTE)
387 /* This field is only used for NOTE_INSN_DELETED_LABEL, and
388 other times often contains garbage from INSN->NOTE death. */
389 if (NOTE_LINE_NUMBER (in_rtx) == NOTE_INSN_DELETED_LABEL)
390 fprintf (outfile, " %d", XINT (in_rtx, i));
392 else
394 int value = XINT (in_rtx, i);
395 const char *name;
397 if (GET_CODE (in_rtx) == REG && value < FIRST_PSEUDO_REGISTER)
399 fputc (' ', outfile);
400 DEBUG_PRINT_REG (in_rtx, 0, outfile);
402 else if (GET_CODE (in_rtx) == REG
403 && value <= LAST_VIRTUAL_REGISTER)
405 if (value == VIRTUAL_INCOMING_ARGS_REGNUM)
406 fprintf (outfile, " %d virtual-incoming-args", value);
407 else if (value == VIRTUAL_STACK_VARS_REGNUM)
408 fprintf (outfile, " %d virtual-stack-vars", value);
409 else if (value == VIRTUAL_STACK_DYNAMIC_REGNUM)
410 fprintf (outfile, " %d virtual-stack-dynamic", value);
411 else if (value == VIRTUAL_OUTGOING_ARGS_REGNUM)
412 fprintf (outfile, " %d virtual-outgoing-args", value);
413 else if (value == VIRTUAL_CFA_REGNUM)
414 fprintf (outfile, " %d virtual-cfa", value);
415 else
416 fprintf (outfile, " %d virtual-reg-%d", value,
417 value-FIRST_VIRTUAL_REGISTER);
419 else if (flag_dump_unnumbered
420 && (is_insn || GET_CODE (in_rtx) == NOTE))
421 fputc ('#', outfile);
422 else
423 fprintf (outfile, " %d", value);
425 if (GET_CODE (in_rtx) == REG && REG_ATTRS (in_rtx))
427 fputs (" [", outfile);
428 if (ORIGINAL_REGNO (in_rtx) != REGNO (in_rtx))
429 fprintf (outfile, "orig:%i", ORIGINAL_REGNO (in_rtx));
430 if (REG_EXPR (in_rtx))
431 print_mem_expr (outfile, REG_EXPR (in_rtx));
433 if (REG_OFFSET (in_rtx))
435 fputc ('+', outfile);
436 fprintf (outfile, HOST_WIDE_INT_PRINT_DEC,
437 REG_OFFSET (in_rtx));
439 fputs (" ]", outfile);
442 if (is_insn && &INSN_CODE (in_rtx) == &XINT (in_rtx, i)
443 && XINT (in_rtx, i) >= 0
444 && (name = get_insn_name (XINT (in_rtx, i))) != NULL)
445 fprintf (outfile, " {%s}", name);
446 sawclose = 0;
448 break;
450 /* Print NOTE_INSN names rather than integer codes. */
452 case 'n':
453 if (XINT (in_rtx, i) >= (int) NOTE_INSN_BIAS
454 && XINT (in_rtx, i) < (int) NOTE_INSN_MAX)
455 fprintf (outfile, " %s", GET_NOTE_INSN_NAME (XINT (in_rtx, i)));
456 else
457 fprintf (outfile, " %d", XINT (in_rtx, i));
458 sawclose = 0;
459 break;
461 case 'u':
462 if (XEXP (in_rtx, i) != NULL)
464 rtx sub = XEXP (in_rtx, i);
465 enum rtx_code subc = GET_CODE (sub);
467 if (GET_CODE (in_rtx) == LABEL_REF)
469 if (subc == NOTE
470 && NOTE_LINE_NUMBER (sub) == NOTE_INSN_DELETED_LABEL)
472 if (flag_dump_unnumbered)
473 fprintf (outfile, " [# deleted]");
474 else
475 fprintf (outfile, " [%d deleted]", INSN_UID (sub));
476 sawclose = 0;
477 break;
480 if (subc != CODE_LABEL)
481 goto do_e;
484 if (flag_dump_unnumbered)
485 fputs (" #", outfile);
486 else
487 fprintf (outfile, " %d", INSN_UID (sub));
489 else
490 fputs (" 0", outfile);
491 sawclose = 0;
492 break;
494 case 'b':
495 if (XBITMAP (in_rtx, i) == NULL)
496 fputs (" {null}", outfile);
497 else
498 bitmap_print (outfile, XBITMAP (in_rtx, i), " {", "}");
499 sawclose = 0;
500 break;
502 case 't':
503 putc (' ', outfile);
504 fprintf (outfile, HOST_PTR_PRINTF, (char *) XTREE (in_rtx, i));
505 break;
507 case '*':
508 fputs (" Unknown", outfile);
509 sawclose = 0;
510 break;
512 case 'B':
513 if (XBBDEF (in_rtx, i))
514 fprintf (outfile, " %i", XBBDEF (in_rtx, i)->index);
515 break;
517 default:
518 fprintf (stderr,
519 "switch format wrong in rtl.print_rtx(). format was: %c.\n",
520 format_ptr[-1]);
521 abort ();
524 switch (GET_CODE (in_rtx))
526 #ifndef GENERATOR_FILE
527 case MEM:
528 fputs (" [", outfile);
529 fprintf (outfile, HOST_WIDE_INT_PRINT_DEC, MEM_ALIAS_SET (in_rtx));
531 if (MEM_EXPR (in_rtx))
532 print_mem_expr (outfile, MEM_EXPR (in_rtx));
534 if (MEM_OFFSET (in_rtx))
536 fputc ('+', outfile);
537 fprintf (outfile, HOST_WIDE_INT_PRINT_DEC,
538 INTVAL (MEM_OFFSET (in_rtx)));
541 if (MEM_SIZE (in_rtx))
543 fputs (" S", outfile);
544 fprintf (outfile, HOST_WIDE_INT_PRINT_DEC,
545 INTVAL (MEM_SIZE (in_rtx)));
548 if (MEM_ALIGN (in_rtx) != 1)
549 fprintf (outfile, " A%u", MEM_ALIGN (in_rtx));
551 fputc (']', outfile);
552 break;
554 case CONST_DOUBLE:
555 if (FLOAT_MODE_P (GET_MODE (in_rtx)))
557 char s[60];
559 real_to_decimal (s, CONST_DOUBLE_REAL_VALUE (in_rtx),
560 sizeof (s), 0, 1);
561 fprintf (outfile, " %s", s);
563 real_to_hexadecimal (s, CONST_DOUBLE_REAL_VALUE (in_rtx),
564 sizeof (s), 0, 1);
565 fprintf (outfile, " [%s]", s);
567 break;
568 #endif
570 case CODE_LABEL:
571 fprintf (outfile, " [%d uses]", LABEL_NUSES (in_rtx));
572 switch (LABEL_KIND (in_rtx))
574 case LABEL_NORMAL: break;
575 case LABEL_STATIC_ENTRY: fputs (" [entry]", outfile); break;
576 case LABEL_GLOBAL_ENTRY: fputs (" [global entry]", outfile); break;
577 case LABEL_WEAK_ENTRY: fputs (" [weak entry]", outfile); break;
578 default: abort();
580 break;
582 case CALL_PLACEHOLDER:
583 if (debug_call_placeholder_verbose)
585 fputs (" (cond [\n (const_string \"normal\") (sequence [", outfile);
586 for (tem = XEXP (in_rtx, 0); tem != 0; tem = NEXT_INSN (tem))
588 fputs ("\n ", outfile);
589 print_inline_rtx (outfile, tem, 4);
592 tem = XEXP (in_rtx, 1);
593 if (tem)
594 fputs ("\n ])\n (const_string \"tail_call\") (sequence [",
595 outfile);
596 for (; tem != 0; tem = NEXT_INSN (tem))
598 fputs ("\n ", outfile);
599 print_inline_rtx (outfile, tem, 4);
602 tem = XEXP (in_rtx, 2);
603 if (tem)
604 fputs ("\n ])\n (const_string \"tail_recursion\") (sequence [",
605 outfile);
606 for (; tem != 0; tem = NEXT_INSN (tem))
608 fputs ("\n ", outfile);
609 print_inline_rtx (outfile, tem, 4);
612 fputs ("\n ])\n ])", outfile);
613 break;
616 for (tem = XEXP (in_rtx, 0); tem != 0; tem = NEXT_INSN (tem))
617 if (GET_CODE (tem) == CALL_INSN)
619 fprintf (outfile, " ");
620 print_rtx (tem);
621 break;
623 break;
625 default:
626 break;
629 if (dump_for_graph
630 && (is_insn || GET_CODE (in_rtx) == NOTE
631 || GET_CODE (in_rtx) == CODE_LABEL || GET_CODE (in_rtx) == BARRIER))
632 sawclose = 0;
633 else
635 fputc (')', outfile);
636 sawclose = 1;
640 /* Print an rtx on the current line of FILE. Initially indent IND
641 characters. */
643 void
644 print_inline_rtx (outf, x, ind)
645 FILE *outf;
646 rtx x;
647 int ind;
649 int oldsaw = sawclose;
650 int oldindent = indent;
652 sawclose = 0;
653 indent = ind;
654 outfile = outf;
655 print_rtx (x);
656 sawclose = oldsaw;
657 indent = oldindent;
660 /* Call this function from the debugger to see what X looks like. */
662 void
663 debug_rtx (x)
664 rtx x;
666 outfile = stderr;
667 sawclose = 0;
668 print_rtx (x);
669 fprintf (stderr, "\n");
672 /* Count of rtx's to print with debug_rtx_list.
673 This global exists because gdb user defined commands have no arguments. */
675 int debug_rtx_count = 0; /* 0 is treated as equivalent to 1 */
677 /* Call this function to print list from X on.
679 N is a count of the rtx's to print. Positive values print from the specified
680 rtx on. Negative values print a window around the rtx.
681 EG: -5 prints 2 rtx's on either side (in addition to the specified rtx). */
683 void
684 debug_rtx_list (x, n)
685 rtx x;
686 int n;
688 int i,count;
689 rtx insn;
691 count = n == 0 ? 1 : n < 0 ? -n : n;
693 /* If we are printing a window, back up to the start. */
695 if (n < 0)
696 for (i = count / 2; i > 0; i--)
698 if (PREV_INSN (x) == 0)
699 break;
700 x = PREV_INSN (x);
703 for (i = count, insn = x; i > 0 && insn != 0; i--, insn = NEXT_INSN (insn))
705 debug_rtx (insn);
706 fprintf (stderr, "\n");
710 /* Call this function to print an rtx list from START to END inclusive. */
712 void
713 debug_rtx_range (start, end)
714 rtx start, end;
716 while (1)
718 debug_rtx (start);
719 fprintf (stderr, "\n");
720 if (!start || start == end)
721 break;
722 start = NEXT_INSN (start);
726 /* Call this function to search an rtx list to find one with insn uid UID,
727 and then call debug_rtx_list to print it, using DEBUG_RTX_COUNT.
728 The found insn is returned to enable further debugging analysis. */
731 debug_rtx_find (x, uid)
732 rtx x;
733 int uid;
735 while (x != 0 && INSN_UID (x) != uid)
736 x = NEXT_INSN (x);
737 if (x != 0)
739 debug_rtx_list (x, debug_rtx_count);
740 return x;
742 else
744 fprintf (stderr, "insn uid %d not found\n", uid);
745 return 0;
749 /* External entry point for printing a chain of insns
750 starting with RTX_FIRST onto file OUTF.
751 A blank line separates insns.
753 If RTX_FIRST is not an insn, then it alone is printed, with no newline. */
755 void
756 print_rtl (outf, rtx_first)
757 FILE *outf;
758 rtx rtx_first;
760 rtx tmp_rtx;
762 outfile = outf;
763 sawclose = 0;
765 if (rtx_first == 0)
767 fputs (print_rtx_head, outf);
768 fputs ("(nil)\n", outf);
770 else
771 switch (GET_CODE (rtx_first))
773 case INSN:
774 case JUMP_INSN:
775 case CALL_INSN:
776 case NOTE:
777 case CODE_LABEL:
778 case BARRIER:
779 for (tmp_rtx = rtx_first; tmp_rtx != 0; tmp_rtx = NEXT_INSN (tmp_rtx))
780 if (! flag_dump_unnumbered
781 || GET_CODE (tmp_rtx) != NOTE || NOTE_LINE_NUMBER (tmp_rtx) < 0)
783 fputs (print_rtx_head, outfile);
784 print_rtx (tmp_rtx);
785 fprintf (outfile, "\n");
787 break;
789 default:
790 fputs (print_rtx_head, outfile);
791 print_rtx (rtx_first);
795 /* Like print_rtx, except specify a file. */
796 /* Return nonzero if we actually printed anything. */
799 print_rtl_single (outf, x)
800 FILE *outf;
801 rtx x;
803 outfile = outf;
804 sawclose = 0;
805 if (! flag_dump_unnumbered
806 || GET_CODE (x) != NOTE || NOTE_LINE_NUMBER (x) < 0)
808 fputs (print_rtx_head, outfile);
809 print_rtx (x);
810 putc ('\n', outf);
811 return 1;
813 return 0;
817 /* Like print_rtl except without all the detail; for example,
818 if RTX is a CONST_INT then print in decimal format. */
820 void
821 print_simple_rtl (outf, x)
822 FILE *outf;
823 rtx x;
825 flag_simple = 1;
826 print_rtl (outf, x);
827 flag_simple = 0;