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