OSDN Git Service

More MIPS vector cleanup work.
[pf3gnuchains/gcc-fork.git] / gcc / print-rtl.c
1 /* Print RTL for GCC.
2    Copyright (C) 1987, 1988, 1992, 1997, 1998, 1999, 2000, 2002, 2003, 2004
3    Free Software Foundation, Inc.
4
5 This file is part of GCC.
6
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.
11
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.
16
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.  */
21
22 /* This file is compiled twice: once for the generator programs,
23    once for the compiler.  */
24 #ifdef GENERATOR_FILE
25 #include "bconfig.h"
26 #else
27 #include "config.h"
28 #endif
29
30 #include "system.h"
31 #include "coretypes.h"
32 #include "tm.h"
33 #include "rtl.h"
34
35 /* These headers all define things which are not available in
36    generator programs.  */
37 #ifndef GENERATOR_FILE
38 #include "tree.h"
39 #include "real.h"
40 #include "flags.h"
41 #include "hard-reg-set.h"
42 #include "basic-block.h"
43 #endif
44
45 static FILE *outfile;
46
47 static int sawclose = 0;
48
49 static int indent;
50
51 static void print_rtx (rtx);
52
53 /* String printed at beginning of each RTL when it is dumped.
54    This string is set to ASM_COMMENT_START when the RTL is dumped in
55    the assembly output file.  */
56 const char *print_rtx_head = "";
57
58 /* Nonzero means suppress output of instruction numbers and line number
59    notes in debugging dumps.
60    This must be defined here so that programs like gencodes can be linked.  */
61 int flag_dump_unnumbered = 0;
62
63 /* Nonzero means use simplified format without flags, modes, etc.  */
64 int flag_simple = 0;
65
66 /* Nonzero if we are dumping graphical description.  */
67 int dump_for_graph;
68
69 #ifndef GENERATOR_FILE
70 void
71 print_mem_expr (FILE *outfile, tree expr)
72 {
73   if (TREE_CODE (expr) == COMPONENT_REF)
74     {
75       if (TREE_OPERAND (expr, 0))
76         print_mem_expr (outfile, TREE_OPERAND (expr, 0));
77       else
78         fputs (" <variable>", outfile);
79       if (DECL_NAME (TREE_OPERAND (expr, 1)))
80         fprintf (outfile, ".%s",
81                  IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (expr, 1))));
82     }
83   else if (TREE_CODE (expr) == INDIRECT_REF)
84     {
85       fputs (" (*", outfile);
86       print_mem_expr (outfile, TREE_OPERAND (expr, 0));
87       fputs (")", outfile);
88     }
89   else if (DECL_NAME (expr))
90     fprintf (outfile, " %s", IDENTIFIER_POINTER (DECL_NAME (expr)));
91   else if (TREE_CODE (expr) == RESULT_DECL)
92     fputs (" <result>", outfile);
93   else
94     fputs (" <anonymous>", outfile);
95 }
96 #endif
97
98 /* Print IN_RTX onto OUTFILE.  This is the recursive part of printing.  */
99
100 static void
101 print_rtx (rtx in_rtx)
102 {
103   int i = 0;
104   int j;
105   const char *format_ptr;
106   int is_insn;
107
108   if (sawclose)
109     {
110       if (flag_simple)
111         fputc (' ', outfile);
112       else
113         fprintf (outfile, "\n%s%*s", print_rtx_head, indent * 2, "");
114       sawclose = 0;
115     }
116
117   if (in_rtx == 0)
118     {
119       fputs ("(nil)", outfile);
120       sawclose = 1;
121       return;
122     }
123   else if (GET_CODE (in_rtx) > NUM_RTX_CODE)
124     {
125        fprintf (outfile, "(??? bad code %d\n)", GET_CODE (in_rtx));
126        sawclose = 1;
127        return;
128     }
129
130   is_insn = INSN_P (in_rtx);
131
132   /* When printing in VCG format we write INSNs, NOTE, LABEL, and BARRIER
133      in separate nodes and therefore have to handle them special here.  */
134   if (dump_for_graph
135       && (is_insn || NOTE_P (in_rtx)
136           || LABEL_P (in_rtx) || BARRIER_P (in_rtx)))
137     {
138       i = 3;
139       indent = 0;
140     }
141   else
142     {
143       /* Print name of expression code.  */
144       if (flag_simple && GET_CODE (in_rtx) == CONST_INT)
145         fputc ('(', outfile);
146       else
147         fprintf (outfile, "(%s", GET_RTX_NAME (GET_CODE (in_rtx)));
148
149       if (! flag_simple)
150         {
151           if (RTX_FLAG (in_rtx, in_struct))
152             fputs ("/s", outfile);
153
154           if (RTX_FLAG (in_rtx, volatil))
155             fputs ("/v", outfile);
156
157           if (RTX_FLAG (in_rtx, unchanging))
158             fputs ("/u", outfile);
159
160           if (RTX_FLAG (in_rtx, frame_related))
161             fputs ("/f", outfile);
162
163           if (RTX_FLAG (in_rtx, jump))
164             fputs ("/j", outfile);
165
166           if (RTX_FLAG (in_rtx, call))
167             fputs ("/c", outfile);
168
169           if (RTX_FLAG (in_rtx, return_val))
170             fputs ("/i", outfile);
171
172           if (GET_MODE (in_rtx) != VOIDmode)
173             {
174               /* Print REG_NOTE names for EXPR_LIST and INSN_LIST.  */
175               if (GET_CODE (in_rtx) == EXPR_LIST
176                   || GET_CODE (in_rtx) == INSN_LIST)
177                 fprintf (outfile, ":%s",
178                          GET_REG_NOTE_NAME (GET_MODE (in_rtx)));
179               else
180                 fprintf (outfile, ":%s", GET_MODE_NAME (GET_MODE (in_rtx)));
181             }
182         }
183     }
184
185 #ifndef GENERATOR_FILE
186   if (GET_CODE (in_rtx) == CONST_DOUBLE && FLOAT_MODE_P (GET_MODE (in_rtx)))
187     i = 5;
188 #endif
189
190   /* Get the format string and skip the first elements if we have handled
191      them already.  */
192   format_ptr = GET_RTX_FORMAT (GET_CODE (in_rtx)) + i;
193   for (; i < GET_RTX_LENGTH (GET_CODE (in_rtx)); i++)
194     switch (*format_ptr++)
195       {
196         const char *str;
197
198       case 'T':
199         str = XTMPL (in_rtx, i);
200         goto string;
201
202       case 'S':
203       case 's':
204         str = XSTR (in_rtx, i);
205       string:
206
207         if (str == 0)
208           fputs (dump_for_graph ? " \\\"\\\"" : " \"\"", outfile);
209         else
210           {
211             if (dump_for_graph)
212               fprintf (outfile, " (\\\"%s\\\")", str);
213             else
214               fprintf (outfile, " (\"%s\")", str);
215           }
216         sawclose = 1;
217         break;
218
219         /* 0 indicates a field for internal use that should not be printed.
220            An exception is the third field of a NOTE, where it indicates
221            that the field has several different valid contents.  */
222       case '0':
223         if (i == 1 && REG_P (in_rtx))
224           {
225             if (REGNO (in_rtx) != ORIGINAL_REGNO (in_rtx))
226               fprintf (outfile, " [%d]", ORIGINAL_REGNO (in_rtx));
227           }
228 #ifndef GENERATOR_FILE
229         else if (i == 1 && GET_CODE (in_rtx) == SYMBOL_REF)
230           {
231             int flags = SYMBOL_REF_FLAGS (in_rtx);
232             if (flags)
233               fprintf (outfile, " [flags 0x%x]", flags);
234           }
235         else if (i == 2 && GET_CODE (in_rtx) == SYMBOL_REF)
236           {
237             tree decl = SYMBOL_REF_DECL (in_rtx);
238             if (decl)
239               print_node_brief (outfile, "", decl, 0);
240           }
241 #endif
242         else if (i == 4 && NOTE_P (in_rtx))
243           {
244             switch (NOTE_LINE_NUMBER (in_rtx))
245               {
246               case NOTE_INSN_EH_REGION_BEG:
247               case NOTE_INSN_EH_REGION_END:
248                 if (flag_dump_unnumbered)
249                   fprintf (outfile, " #");
250                 else
251                   fprintf (outfile, " %d", NOTE_EH_HANDLER (in_rtx));
252                 sawclose = 1;
253                 break;
254
255               case NOTE_INSN_BLOCK_BEG:
256               case NOTE_INSN_BLOCK_END:
257                 fprintf (outfile, " ");
258                 if (flag_dump_unnumbered)
259                   fprintf (outfile, "#");
260                 else
261                   fprintf (outfile, HOST_PTR_PRINTF,
262                            (char *) NOTE_BLOCK (in_rtx));
263                 sawclose = 1;
264                 break;
265
266               case NOTE_INSN_BASIC_BLOCK:
267                 {
268 #ifndef GENERATOR_FILE
269                   basic_block bb = NOTE_BASIC_BLOCK (in_rtx);
270                   if (bb != 0)
271                     fprintf (outfile, " [bb %d]", bb->index);
272 #endif
273                   break;
274                 }
275
276               case NOTE_INSN_EXPECTED_VALUE:
277                 indent += 2;
278                 if (!sawclose)
279                   fprintf (outfile, " ");
280                 print_rtx (NOTE_EXPECTED_VALUE (in_rtx));
281                 indent -= 2;
282                 break;
283
284               case NOTE_INSN_DELETED_LABEL:
285                 {
286                   const char *label = NOTE_DELETED_LABEL_NAME (in_rtx);
287                   if (label)
288                     fprintf (outfile, " (\"%s\")", label);
289                   else
290                     fprintf (outfile, " \"\"");
291                 }
292                 break;
293
294               case NOTE_INSN_UNLIKELY_EXECUTED_CODE:
295                 {
296 #ifndef GENERATOR_FILE
297                   basic_block bb = NOTE_BASIC_BLOCK (in_rtx);
298                   if (bb != 0)
299                     fprintf (outfile, " [bb %d]", bb->index);
300 #endif
301                   break;
302                 }
303                 
304               case NOTE_INSN_VAR_LOCATION:
305 #ifndef GENERATOR_FILE
306                 fprintf (outfile, " (");
307                 print_mem_expr (outfile, NOTE_VAR_LOCATION_DECL (in_rtx));
308                 fprintf (outfile, " ");
309                 print_rtx (NOTE_VAR_LOCATION_LOC (in_rtx));
310                 fprintf (outfile, ")");
311 #endif
312                 break;
313
314               default:
315                 {
316                   const char * const str = X0STR (in_rtx, i);
317
318                   if (NOTE_LINE_NUMBER (in_rtx) < 0)
319                     ;
320                   else if (str == 0)
321                     fputs (dump_for_graph ? " \\\"\\\"" : " \"\"", outfile);
322                   else
323                     {
324                       if (dump_for_graph)
325                         fprintf (outfile, " (\\\"%s\\\")", str);
326                       else
327                         fprintf (outfile, " (\"%s\")", str);
328                     }
329                   break;
330                 }
331               }
332           }
333         break;
334
335       case 'e':
336       do_e:
337         indent += 2;
338         if (!sawclose)
339           fprintf (outfile, " ");
340         print_rtx (XEXP (in_rtx, i));
341         indent -= 2;
342         break;
343
344       case 'E':
345       case 'V':
346         indent += 2;
347         if (sawclose)
348           {
349             fprintf (outfile, "\n%s%*s",
350                      print_rtx_head, indent * 2, "");
351             sawclose = 0;
352           }
353         fputs (" [", outfile);
354         if (NULL != XVEC (in_rtx, i))
355           {
356             indent += 2;
357             if (XVECLEN (in_rtx, i))
358               sawclose = 1;
359
360             for (j = 0; j < XVECLEN (in_rtx, i); j++)
361               print_rtx (XVECEXP (in_rtx, i, j));
362
363             indent -= 2;
364           }
365         if (sawclose)
366           fprintf (outfile, "\n%s%*s", print_rtx_head, indent * 2, "");
367
368         fputs ("]", outfile);
369         sawclose = 1;
370         indent -= 2;
371         break;
372
373       case 'w':
374         if (! flag_simple)
375           fprintf (outfile, " ");
376         fprintf (outfile, HOST_WIDE_INT_PRINT_DEC, XWINT (in_rtx, i));
377         if (! flag_simple)
378           fprintf (outfile, " [" HOST_WIDE_INT_PRINT_HEX "]",
379                    XWINT (in_rtx, i));
380         break;
381
382       case 'i':
383         if (i == 4 && INSN_P (in_rtx))
384           {
385 #ifndef GENERATOR_FILE
386             /*  Pretty-print insn locators.  Ignore scoping as it is mostly
387                 redundant with line number information and do not print anything
388                 when there is no location information available.  */
389             if (INSN_LOCATOR (in_rtx) && insn_file (in_rtx))
390               fprintf(outfile, " %s:%i", insn_file (in_rtx), insn_line (in_rtx));
391 #endif
392           }
393         else if (i == 6 && NOTE_P (in_rtx))
394           {
395             /* This field is only used for NOTE_INSN_DELETED_LABEL, and
396                other times often contains garbage from INSN->NOTE death.  */
397             if (NOTE_LINE_NUMBER (in_rtx) == NOTE_INSN_DELETED_LABEL)
398               fprintf (outfile, " %d",  XINT (in_rtx, i));
399           }
400         else
401           {
402             int value = XINT (in_rtx, i);
403             const char *name;
404
405 #ifndef GENERATOR_FILE
406             if (REG_P (in_rtx) && value < FIRST_PSEUDO_REGISTER)
407               fprintf (outfile, " %d %s", REGNO (in_rtx),
408                        reg_names[REGNO (in_rtx)]);
409             else if (REG_P (in_rtx)
410                      && value <= LAST_VIRTUAL_REGISTER)
411               {
412                 if (value == VIRTUAL_INCOMING_ARGS_REGNUM)
413                   fprintf (outfile, " %d virtual-incoming-args", value);
414                 else if (value == VIRTUAL_STACK_VARS_REGNUM)
415                   fprintf (outfile, " %d virtual-stack-vars", value);
416                 else if (value == VIRTUAL_STACK_DYNAMIC_REGNUM)
417                   fprintf (outfile, " %d virtual-stack-dynamic", value);
418                 else if (value == VIRTUAL_OUTGOING_ARGS_REGNUM)
419                   fprintf (outfile, " %d virtual-outgoing-args", value);
420                 else if (value == VIRTUAL_CFA_REGNUM)
421                   fprintf (outfile, " %d virtual-cfa", value);
422                 else
423                   fprintf (outfile, " %d virtual-reg-%d", value,
424                            value-FIRST_VIRTUAL_REGISTER);
425               }
426             else
427 #endif
428               if (flag_dump_unnumbered
429                      && (is_insn || NOTE_P (in_rtx)))
430               fputc ('#', outfile);
431             else
432               fprintf (outfile, " %d", value);
433
434 #ifndef GENERATOR_FILE
435             if (REG_P (in_rtx) && REG_ATTRS (in_rtx))
436               {
437                 fputs (" [", outfile);
438                 if (ORIGINAL_REGNO (in_rtx) != REGNO (in_rtx))
439                   fprintf (outfile, "orig:%i", ORIGINAL_REGNO (in_rtx));
440                 if (REG_EXPR (in_rtx))
441                   print_mem_expr (outfile, REG_EXPR (in_rtx));
442
443                 if (REG_OFFSET (in_rtx))
444                   fprintf (outfile, "+" HOST_WIDE_INT_PRINT_DEC,
445                            REG_OFFSET (in_rtx));
446                 fputs (" ]", outfile);
447               }
448 #endif
449
450             if (is_insn && &INSN_CODE (in_rtx) == &XINT (in_rtx, i)
451                 && XINT (in_rtx, i) >= 0
452                 && (name = get_insn_name (XINT (in_rtx, i))) != NULL)
453               fprintf (outfile, " {%s}", name);
454             sawclose = 0;
455           }
456         break;
457
458       /* Print NOTE_INSN names rather than integer codes.  */
459
460       case 'n':
461         if (XINT (in_rtx, i) >= (int) NOTE_INSN_BIAS
462             && XINT (in_rtx, i) < (int) NOTE_INSN_MAX)
463           fprintf (outfile, " %s", GET_NOTE_INSN_NAME (XINT (in_rtx, i)));
464         else
465           fprintf (outfile, " %d", XINT (in_rtx, i));
466         sawclose = 0;
467         break;
468
469       case 'u':
470         if (XEXP (in_rtx, i) != NULL)
471           {
472             rtx sub = XEXP (in_rtx, i);
473             enum rtx_code subc = GET_CODE (sub);
474
475             if (GET_CODE (in_rtx) == LABEL_REF)
476               {
477                 if (subc == NOTE
478                     && NOTE_LINE_NUMBER (sub) == NOTE_INSN_DELETED_LABEL)
479                   {
480                     if (flag_dump_unnumbered)
481                       fprintf (outfile, " [# deleted]");
482                     else
483                       fprintf (outfile, " [%d deleted]", INSN_UID (sub));
484                     sawclose = 0;
485                     break;
486                   }
487
488                 if (subc != CODE_LABEL)
489                   goto do_e;
490               }
491
492             if (flag_dump_unnumbered)
493               fputs (" #", outfile);
494             else
495               fprintf (outfile, " %d", INSN_UID (sub));
496           }
497         else
498           fputs (" 0", outfile);
499         sawclose = 0;
500         break;
501
502       case 'b':
503 #ifndef GENERATOR_FILE
504         if (XBITMAP (in_rtx, i) == NULL)
505           fputs (" {null}", outfile);
506         else
507           bitmap_print (outfile, XBITMAP (in_rtx, i), " {", "}");
508 #endif
509         sawclose = 0;
510         break;
511
512       case 't':
513         fprintf (outfile, " " HOST_PTR_PRINTF, (void *) XTREE (in_rtx, i));
514         break;
515
516       case '*':
517         fputs (" Unknown", outfile);
518         sawclose = 0;
519         break;
520
521       case 'B':
522 #ifndef GENERATOR_FILE
523         if (XBBDEF (in_rtx, i))
524           fprintf (outfile, " %i", XBBDEF (in_rtx, i)->index);
525 #endif
526         break;
527
528       default:
529         fprintf (stderr,
530                  "switch format wrong in rtl.print_rtx(). format was: %c.\n",
531                  format_ptr[-1]);
532         abort ();
533       }
534
535   switch (GET_CODE (in_rtx))
536     {
537 #ifndef GENERATOR_FILE
538     case MEM:
539       fprintf (outfile, " [" HOST_WIDE_INT_PRINT_DEC, MEM_ALIAS_SET (in_rtx));
540
541       if (MEM_EXPR (in_rtx))
542         print_mem_expr (outfile, MEM_EXPR (in_rtx));
543
544       if (MEM_OFFSET (in_rtx))
545         fprintf (outfile, "+" HOST_WIDE_INT_PRINT_DEC,
546                  INTVAL (MEM_OFFSET (in_rtx)));
547
548       if (MEM_SIZE (in_rtx))
549         fprintf (outfile, " S" HOST_WIDE_INT_PRINT_DEC,
550                  INTVAL (MEM_SIZE (in_rtx)));
551
552       if (MEM_ALIGN (in_rtx) != 1)
553         fprintf (outfile, " A%u", MEM_ALIGN (in_rtx));
554
555       fputc (']', outfile);
556       break;
557
558     case CONST_DOUBLE:
559       if (FLOAT_MODE_P (GET_MODE (in_rtx)))
560         {
561           char s[60];
562
563           real_to_decimal (s, CONST_DOUBLE_REAL_VALUE (in_rtx),
564                            sizeof (s), 0, 1);
565           fprintf (outfile, " %s", s);
566
567           real_to_hexadecimal (s, CONST_DOUBLE_REAL_VALUE (in_rtx),
568                                sizeof (s), 0, 1);
569           fprintf (outfile, " [%s]", s);
570         }
571       break;
572 #endif
573
574     case CODE_LABEL:
575       fprintf (outfile, " [%d uses]", LABEL_NUSES (in_rtx));
576       switch (LABEL_KIND (in_rtx))
577         {
578           case LABEL_NORMAL: break;
579           case LABEL_STATIC_ENTRY: fputs (" [entry]", outfile); break;
580           case LABEL_GLOBAL_ENTRY: fputs (" [global entry]", outfile); break;
581           case LABEL_WEAK_ENTRY: fputs (" [weak entry]", outfile); break;
582           default: abort();
583         }
584       break;
585
586     default:
587       break;
588     }
589
590   if (dump_for_graph
591       && (is_insn || NOTE_P (in_rtx)
592           || LABEL_P (in_rtx) || BARRIER_P (in_rtx)))
593     sawclose = 0;
594   else
595     {
596       fputc (')', outfile);
597       sawclose = 1;
598     }
599 }
600
601 /* Print an rtx on the current line of FILE.  Initially indent IND
602    characters.  */
603
604 void
605 print_inline_rtx (FILE *outf, rtx x, int ind)
606 {
607   int oldsaw = sawclose;
608   int oldindent = indent;
609
610   sawclose = 0;
611   indent = ind;
612   outfile = outf;
613   print_rtx (x);
614   sawclose = oldsaw;
615   indent = oldindent;
616 }
617
618 /* Call this function from the debugger to see what X looks like.  */
619
620 void
621 debug_rtx (rtx x)
622 {
623   outfile = stderr;
624   sawclose = 0;
625   print_rtx (x);
626   fprintf (stderr, "\n");
627 }
628
629 /* Count of rtx's to print with debug_rtx_list.
630    This global exists because gdb user defined commands have no arguments.  */
631
632 int debug_rtx_count = 0;        /* 0 is treated as equivalent to 1 */
633
634 /* Call this function to print list from X on.
635
636    N is a count of the rtx's to print. Positive values print from the specified
637    rtx on.  Negative values print a window around the rtx.
638    EG: -5 prints 2 rtx's on either side (in addition to the specified rtx).  */
639
640 void
641 debug_rtx_list (rtx x, int n)
642 {
643   int i,count;
644   rtx insn;
645
646   count = n == 0 ? 1 : n < 0 ? -n : n;
647
648   /* If we are printing a window, back up to the start.  */
649
650   if (n < 0)
651     for (i = count / 2; i > 0; i--)
652       {
653         if (PREV_INSN (x) == 0)
654           break;
655         x = PREV_INSN (x);
656       }
657
658   for (i = count, insn = x; i > 0 && insn != 0; i--, insn = NEXT_INSN (insn))
659     {
660       debug_rtx (insn);
661       fprintf (stderr, "\n");
662     }
663 }
664
665 /* Call this function to print an rtx list from START to END inclusive.  */
666
667 void
668 debug_rtx_range (rtx start, rtx end)
669 {
670   while (1)
671     {
672       debug_rtx (start);
673       fprintf (stderr, "\n");
674       if (!start || start == end)
675         break;
676       start = NEXT_INSN (start);
677     }
678 }
679
680 /* Call this function to search an rtx list to find one with insn uid UID,
681    and then call debug_rtx_list to print it, using DEBUG_RTX_COUNT.
682    The found insn is returned to enable further debugging analysis.  */
683
684 rtx
685 debug_rtx_find (rtx x, int uid)
686 {
687   while (x != 0 && INSN_UID (x) != uid)
688     x = NEXT_INSN (x);
689   if (x != 0)
690     {
691       debug_rtx_list (x, debug_rtx_count);
692       return x;
693     }
694   else
695     {
696       fprintf (stderr, "insn uid %d not found\n", uid);
697       return 0;
698     }
699 }
700
701 /* External entry point for printing a chain of insns
702    starting with RTX_FIRST onto file OUTF.
703    A blank line separates insns.
704
705    If RTX_FIRST is not an insn, then it alone is printed, with no newline.  */
706
707 void
708 print_rtl (FILE *outf, rtx rtx_first)
709 {
710   rtx tmp_rtx;
711
712   outfile = outf;
713   sawclose = 0;
714
715   if (rtx_first == 0)
716     {
717       fputs (print_rtx_head, outf);
718       fputs ("(nil)\n", outf);
719     }
720   else
721     switch (GET_CODE (rtx_first))
722       {
723       case INSN:
724       case JUMP_INSN:
725       case CALL_INSN:
726       case NOTE:
727       case CODE_LABEL:
728       case BARRIER:
729         for (tmp_rtx = rtx_first; tmp_rtx != 0; tmp_rtx = NEXT_INSN (tmp_rtx))
730           if (! flag_dump_unnumbered
731               || !NOTE_P (tmp_rtx) || NOTE_LINE_NUMBER (tmp_rtx) < 0)
732             {
733               fputs (print_rtx_head, outfile);
734               print_rtx (tmp_rtx);
735               fprintf (outfile, "\n");
736             }
737         break;
738
739       default:
740         fputs (print_rtx_head, outfile);
741         print_rtx (rtx_first);
742       }
743 }
744
745 /* Like print_rtx, except specify a file.  */
746 /* Return nonzero if we actually printed anything.  */
747
748 int
749 print_rtl_single (FILE *outf, rtx x)
750 {
751   outfile = outf;
752   sawclose = 0;
753   if (! flag_dump_unnumbered
754       || !NOTE_P (x) || NOTE_LINE_NUMBER (x) < 0)
755     {
756       fputs (print_rtx_head, outfile);
757       print_rtx (x);
758       putc ('\n', outf);
759       return 1;
760     }
761   return 0;
762 }
763
764
765 /* Like print_rtl except without all the detail; for example,
766    if RTX is a CONST_INT then print in decimal format.  */
767
768 void
769 print_simple_rtl (FILE *outf, rtx x)
770 {
771   flag_simple = 1;
772   print_rtl (outf, x);
773   flag_simple = 0;
774 }