OSDN Git Service

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