OSDN Git Service

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