OSDN Git Service

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