1 /* Pretty formatting of GENERIC trees in C syntax.
2 Copyright (C) 2001-2013 Free Software Foundation, Inc.
3 Adapted from c-pretty-print.c by Diego Novillo <dnovillo@redhat.com>
5 This file is part of GCC.
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 3, or (at your option) any later
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
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
23 #include "coretypes.h"
26 #include "tree-pretty-print.h"
28 #include "tree-flow.h"
29 #include "langhooks.h"
30 #include "tree-iterator.h"
31 #include "tree-chrec.h"
33 #include "value-prof.h"
36 #include <new> // For placement-new.
38 /* Local functions, macros and variables. */
39 static const char *op_symbol (const_tree
);
40 static void pretty_print_string (pretty_printer
*, const char*);
41 static void newline_and_indent (pretty_printer
*, int);
42 static void maybe_init_pretty_print (FILE *);
43 static void print_struct_decl (pretty_printer
*, const_tree
, int, int);
44 static void do_niy (pretty_printer
*, const_tree
);
46 #define INDENT(SPACE) do { \
47 int i; for (i = 0; i<SPACE; i++) pp_space (buffer); } while (0)
49 #define NIY do_niy(buffer,node)
51 static pretty_printer buffer
;
52 static int initialized
= 0;
54 /* Try to print something for an unknown tree code. */
57 do_niy (pretty_printer
*buffer
, const_tree node
)
61 pp_string (buffer
, "<<< Unknown tree: ");
62 pp_string (buffer
, tree_code_name
[(int) TREE_CODE (node
)]);
66 len
= TREE_OPERAND_LENGTH (node
);
67 for (i
= 0; i
< len
; ++i
)
69 newline_and_indent (buffer
, 2);
70 dump_generic_node (buffer
, TREE_OPERAND (node
, i
), 2, 0, false);
74 pp_string (buffer
, " >>>");
77 /* Debugging function to print out a generic expression. */
80 debug_generic_expr (tree t
)
82 print_generic_expr (stderr
, t
, TDF_VOPS
|TDF_MEMSYMS
);
83 fprintf (stderr
, "\n");
86 /* Debugging function to print out a generic statement. */
89 debug_generic_stmt (tree t
)
91 print_generic_stmt (stderr
, t
, TDF_VOPS
|TDF_MEMSYMS
);
92 fprintf (stderr
, "\n");
95 /* Debugging function to print out a chain of trees . */
98 debug_tree_chain (tree t
)
100 struct pointer_set_t
*seen
= pointer_set_create ();
104 print_generic_expr (stderr
, t
, TDF_VOPS
|TDF_MEMSYMS
|TDF_UID
);
105 fprintf (stderr
, " ");
107 if (pointer_set_insert (seen
, t
))
109 fprintf (stderr
, "... [cycled back to ");
110 print_generic_expr (stderr
, t
, TDF_VOPS
|TDF_MEMSYMS
|TDF_UID
);
111 fprintf (stderr
, "]");
115 fprintf (stderr
, "\n");
117 pointer_set_destroy (seen
);
120 /* Prints declaration DECL to the FILE with details specified by FLAGS. */
122 print_generic_decl (FILE *file
, tree decl
, int flags
)
124 maybe_init_pretty_print (file
);
125 print_declaration (&buffer
, decl
, 2, flags
);
126 pp_write_text_to_stream (&buffer
);
129 /* Print tree T, and its successors, on file FILE. FLAGS specifies details
130 to show in the dump. See TDF_* in dumpfile.h. */
133 print_generic_stmt (FILE *file
, tree t
, int flags
)
135 maybe_init_pretty_print (file
);
136 dump_generic_node (&buffer
, t
, 0, flags
, true);
137 pp_newline_and_flush (&buffer
);
140 /* Print tree T, and its successors, on file FILE. FLAGS specifies details
141 to show in the dump. See TDF_* in dumpfile.h. The output is indented by
145 print_generic_stmt_indented (FILE *file
, tree t
, int flags
, int indent
)
149 maybe_init_pretty_print (file
);
151 for (i
= 0; i
< indent
; i
++)
153 dump_generic_node (&buffer
, t
, indent
, flags
, true);
154 pp_newline_and_flush (&buffer
);
157 /* Print a single expression T on file FILE. FLAGS specifies details to show
158 in the dump. See TDF_* in dumpfile.h. */
161 print_generic_expr (FILE *file
, tree t
, int flags
)
163 maybe_init_pretty_print (file
);
164 dump_generic_node (&buffer
, t
, 0, flags
, false);
168 /* Dump the name of a _DECL node and its DECL_UID if TDF_UID is set
172 dump_decl_name (pretty_printer
*buffer
, tree node
, int flags
)
174 if (DECL_NAME (node
))
176 if ((flags
& TDF_ASMNAME
) && DECL_ASSEMBLER_NAME_SET_P (node
))
177 pp_tree_identifier (buffer
, DECL_ASSEMBLER_NAME (node
));
179 pp_tree_identifier (buffer
, DECL_NAME (node
));
181 if ((flags
& TDF_UID
) || DECL_NAME (node
) == NULL_TREE
)
183 if (TREE_CODE (node
) == LABEL_DECL
&& LABEL_DECL_UID (node
) != -1)
184 pp_printf (buffer
, "L.%d", (int) LABEL_DECL_UID (node
));
185 else if (TREE_CODE (node
) == DEBUG_EXPR_DECL
)
187 if (flags
& TDF_NOUID
)
188 pp_string (buffer
, "D#xxxx");
190 pp_printf (buffer
, "D#%i", DEBUG_TEMP_UID (node
));
194 char c
= TREE_CODE (node
) == CONST_DECL
? 'C' : 'D';
195 if (flags
& TDF_NOUID
)
196 pp_printf (buffer
, "%c.xxxx", c
);
198 pp_printf (buffer
, "%c.%u", c
, DECL_UID (node
));
201 if ((flags
& TDF_ALIAS
) && DECL_PT_UID (node
) != DECL_UID (node
))
203 if (flags
& TDF_NOUID
)
204 pp_printf (buffer
, "ptD.xxxx");
206 pp_printf (buffer
, "ptD.%u", DECL_PT_UID (node
));
210 /* Like the above, but used for pretty printing function calls. */
213 dump_function_name (pretty_printer
*buffer
, tree node
, int flags
)
215 if (TREE_CODE (node
) == NOP_EXPR
)
216 node
= TREE_OPERAND (node
, 0);
217 if (DECL_NAME (node
) && (flags
& TDF_ASMNAME
) == 0)
218 pp_string (buffer
, lang_hooks
.decl_printable_name (node
, 1));
220 dump_decl_name (buffer
, node
, flags
);
223 /* Dump a function declaration. NODE is the FUNCTION_TYPE. BUFFER, SPC and
224 FLAGS are as in dump_generic_node. */
227 dump_function_declaration (pretty_printer
*buffer
, tree node
,
230 bool wrote_arg
= false;
234 pp_left_paren (buffer
);
236 /* Print the argument types. */
237 arg
= TYPE_ARG_TYPES (node
);
238 while (arg
&& arg
!= void_list_node
&& arg
!= error_mark_node
)
246 dump_generic_node (buffer
, TREE_VALUE (arg
), spc
, flags
, false);
247 arg
= TREE_CHAIN (arg
);
250 /* Drop the trailing void_type_node if we had any previous argument. */
251 if (arg
== void_list_node
&& !wrote_arg
)
252 pp_string (buffer
, "void");
253 /* Properly dump vararg function types. */
254 else if (!arg
&& wrote_arg
)
255 pp_string (buffer
, ", ...");
256 /* Avoid printing any arg for unprototyped functions. */
258 pp_right_paren (buffer
);
261 /* Dump the domain associated with an array. */
264 dump_array_domain (pretty_printer
*buffer
, tree domain
, int spc
, int flags
)
266 pp_left_bracket (buffer
);
269 tree min
= TYPE_MIN_VALUE (domain
);
270 tree max
= TYPE_MAX_VALUE (domain
);
273 && integer_zerop (min
)
274 && host_integerp (max
, 0))
275 pp_wide_integer (buffer
, TREE_INT_CST_LOW (max
) + 1);
279 dump_generic_node (buffer
, min
, spc
, flags
, false);
282 dump_generic_node (buffer
, max
, spc
, flags
, false);
286 pp_string (buffer
, "<unknown>");
287 pp_right_bracket (buffer
);
291 /* Dump OpenMP clause CLAUSE. BUFFER, CLAUSE, SPC and FLAGS are as in
292 dump_generic_node. */
295 dump_omp_clause (pretty_printer
*buffer
, tree clause
, int spc
, int flags
)
299 switch (OMP_CLAUSE_CODE (clause
))
301 case OMP_CLAUSE_PRIVATE
:
304 case OMP_CLAUSE_SHARED
:
307 case OMP_CLAUSE_FIRSTPRIVATE
:
308 name
= "firstprivate";
310 case OMP_CLAUSE_LASTPRIVATE
:
311 name
= "lastprivate";
313 case OMP_CLAUSE_COPYIN
:
316 case OMP_CLAUSE_COPYPRIVATE
:
317 name
= "copyprivate";
319 case OMP_CLAUSE_UNIFORM
:
323 pp_string (buffer
, name
);
324 pp_left_paren (buffer
);
325 dump_generic_node (buffer
, OMP_CLAUSE_DECL (clause
),
327 pp_right_paren (buffer
);
330 case OMP_CLAUSE_REDUCTION
:
331 pp_string (buffer
, "reduction(");
332 pp_string (buffer
, op_symbol_code (OMP_CLAUSE_REDUCTION_CODE (clause
)));
334 dump_generic_node (buffer
, OMP_CLAUSE_DECL (clause
),
336 pp_right_paren (buffer
);
340 pp_string (buffer
, "if(");
341 dump_generic_node (buffer
, OMP_CLAUSE_IF_EXPR (clause
),
343 pp_right_paren (buffer
);
346 case OMP_CLAUSE_NUM_THREADS
:
347 pp_string (buffer
, "num_threads(");
348 dump_generic_node (buffer
, OMP_CLAUSE_NUM_THREADS_EXPR (clause
),
350 pp_right_paren (buffer
);
353 case OMP_CLAUSE_NOWAIT
:
354 pp_string (buffer
, "nowait");
356 case OMP_CLAUSE_ORDERED
:
357 pp_string (buffer
, "ordered");
360 case OMP_CLAUSE_DEFAULT
:
361 pp_string (buffer
, "default(");
362 switch (OMP_CLAUSE_DEFAULT_KIND (clause
))
364 case OMP_CLAUSE_DEFAULT_UNSPECIFIED
:
366 case OMP_CLAUSE_DEFAULT_SHARED
:
367 pp_string (buffer
, "shared");
369 case OMP_CLAUSE_DEFAULT_NONE
:
370 pp_string (buffer
, "none");
372 case OMP_CLAUSE_DEFAULT_PRIVATE
:
373 pp_string (buffer
, "private");
375 case OMP_CLAUSE_DEFAULT_FIRSTPRIVATE
:
376 pp_string (buffer
, "firstprivate");
381 pp_right_paren (buffer
);
384 case OMP_CLAUSE_SCHEDULE
:
385 pp_string (buffer
, "schedule(");
386 switch (OMP_CLAUSE_SCHEDULE_KIND (clause
))
388 case OMP_CLAUSE_SCHEDULE_STATIC
:
389 pp_string (buffer
, "static");
391 case OMP_CLAUSE_SCHEDULE_DYNAMIC
:
392 pp_string (buffer
, "dynamic");
394 case OMP_CLAUSE_SCHEDULE_GUIDED
:
395 pp_string (buffer
, "guided");
397 case OMP_CLAUSE_SCHEDULE_RUNTIME
:
398 pp_string (buffer
, "runtime");
400 case OMP_CLAUSE_SCHEDULE_AUTO
:
401 pp_string (buffer
, "auto");
406 if (OMP_CLAUSE_SCHEDULE_CHUNK_EXPR (clause
))
409 dump_generic_node (buffer
,
410 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR (clause
),
413 pp_right_paren (buffer
);
416 case OMP_CLAUSE_UNTIED
:
417 pp_string (buffer
, "untied");
420 case OMP_CLAUSE_COLLAPSE
:
421 pp_string (buffer
, "collapse(");
422 dump_generic_node (buffer
,
423 OMP_CLAUSE_COLLAPSE_EXPR (clause
),
425 pp_right_paren (buffer
);
428 case OMP_CLAUSE_FINAL
:
429 pp_string (buffer
, "final(");
430 dump_generic_node (buffer
, OMP_CLAUSE_FINAL_EXPR (clause
),
432 pp_right_paren (buffer
);
435 case OMP_CLAUSE_MERGEABLE
:
436 pp_string (buffer
, "mergeable");
439 case OMP_CLAUSE_LINEAR
:
440 pp_string (buffer
, "linear(");
441 dump_generic_node (buffer
, OMP_CLAUSE_DECL (clause
),
443 pp_character (buffer
, ':');
444 dump_generic_node (buffer
, OMP_CLAUSE_LINEAR_STEP (clause
),
446 pp_character (buffer
, ')');
449 case OMP_CLAUSE_SAFELEN
:
450 pp_string (buffer
, "safelen(");
451 dump_generic_node (buffer
, OMP_CLAUSE_SAFELEN_EXPR (clause
),
453 pp_character (buffer
, ')');
456 case OMP_CLAUSE__SIMDUID_
:
457 pp_string (buffer
, "_simduid_(");
458 dump_generic_node (buffer
, OMP_CLAUSE__SIMDUID__DECL (clause
),
460 pp_character (buffer
, ')');
464 /* Should never happen. */
465 dump_generic_node (buffer
, clause
, spc
, flags
, false);
471 /* Dump the list of OpenMP clauses. BUFFER, SPC and FLAGS are as in
472 dump_generic_node. */
475 dump_omp_clauses (pretty_printer
*buffer
, tree clause
, int spc
, int flags
)
483 dump_omp_clause (buffer
, clause
, spc
, flags
);
484 clause
= OMP_CLAUSE_CHAIN (clause
);
492 /* Dump location LOC to BUFFER. */
495 dump_location (pretty_printer
*buffer
, location_t loc
)
497 expanded_location xloc
= expand_location (loc
);
499 pp_left_bracket (buffer
);
502 pp_string (buffer
, xloc
.file
);
503 pp_string (buffer
, " : ");
505 pp_decimal_int (buffer
, xloc
.line
);
506 pp_string (buffer
, "] ");
510 /* Dump lexical block BLOCK. BUFFER, SPC and FLAGS are as in
511 dump_generic_node. */
514 dump_block_node (pretty_printer
*buffer
, tree block
, int spc
, int flags
)
518 pp_printf (buffer
, "BLOCK #%d ", BLOCK_NUMBER (block
));
520 if (flags
& TDF_ADDRESS
)
521 pp_printf (buffer
, "[%p] ", (void *) block
);
523 if (BLOCK_ABSTRACT (block
))
524 pp_string (buffer
, "[abstract] ");
526 if (TREE_ASM_WRITTEN (block
))
527 pp_string (buffer
, "[written] ");
529 if (flags
& TDF_SLIM
)
532 if (BLOCK_SOURCE_LOCATION (block
))
533 dump_location (buffer
, BLOCK_SOURCE_LOCATION (block
));
535 newline_and_indent (buffer
, spc
+ 2);
537 if (BLOCK_SUPERCONTEXT (block
))
539 pp_string (buffer
, "SUPERCONTEXT: ");
540 dump_generic_node (buffer
, BLOCK_SUPERCONTEXT (block
), 0,
541 flags
| TDF_SLIM
, false);
542 newline_and_indent (buffer
, spc
+ 2);
545 if (BLOCK_SUBBLOCKS (block
))
547 pp_string (buffer
, "SUBBLOCKS: ");
548 for (t
= BLOCK_SUBBLOCKS (block
); t
; t
= BLOCK_CHAIN (t
))
550 dump_generic_node (buffer
, t
, 0, flags
| TDF_SLIM
, false);
553 newline_and_indent (buffer
, spc
+ 2);
556 if (BLOCK_CHAIN (block
))
558 pp_string (buffer
, "SIBLINGS: ");
559 for (t
= BLOCK_CHAIN (block
); t
; t
= BLOCK_CHAIN (t
))
561 dump_generic_node (buffer
, t
, 0, flags
| TDF_SLIM
, false);
564 newline_and_indent (buffer
, spc
+ 2);
567 if (BLOCK_VARS (block
))
569 pp_string (buffer
, "VARS: ");
570 for (t
= BLOCK_VARS (block
); t
; t
= TREE_CHAIN (t
))
572 dump_generic_node (buffer
, t
, 0, flags
, false);
575 newline_and_indent (buffer
, spc
+ 2);
578 if (vec_safe_length (BLOCK_NONLOCALIZED_VARS (block
)) > 0)
581 vec
<tree
, va_gc
> *nlv
= BLOCK_NONLOCALIZED_VARS (block
);
583 pp_string (buffer
, "NONLOCALIZED_VARS: ");
584 FOR_EACH_VEC_ELT (*nlv
, i
, t
)
586 dump_generic_node (buffer
, t
, 0, flags
, false);
589 newline_and_indent (buffer
, spc
+ 2);
592 if (BLOCK_ABSTRACT_ORIGIN (block
))
594 pp_string (buffer
, "ABSTRACT_ORIGIN: ");
595 dump_generic_node (buffer
, BLOCK_ABSTRACT_ORIGIN (block
), 0,
596 flags
| TDF_SLIM
, false);
597 newline_and_indent (buffer
, spc
+ 2);
600 if (BLOCK_FRAGMENT_ORIGIN (block
))
602 pp_string (buffer
, "FRAGMENT_ORIGIN: ");
603 dump_generic_node (buffer
, BLOCK_FRAGMENT_ORIGIN (block
), 0,
604 flags
| TDF_SLIM
, false);
605 newline_and_indent (buffer
, spc
+ 2);
608 if (BLOCK_FRAGMENT_CHAIN (block
))
610 pp_string (buffer
, "FRAGMENT_CHAIN: ");
611 for (t
= BLOCK_FRAGMENT_CHAIN (block
); t
; t
= BLOCK_FRAGMENT_CHAIN (t
))
613 dump_generic_node (buffer
, t
, 0, flags
| TDF_SLIM
, false);
616 newline_and_indent (buffer
, spc
+ 2);
621 /* Dump the node NODE on the pretty_printer BUFFER, SPC spaces of
622 indent. FLAGS specifies details to show in the dump (see TDF_* in
623 dumpfile.h). If IS_STMT is true, the object printed is considered
624 to be a statement and it is terminated by ';' if appropriate. */
627 dump_generic_node (pretty_printer
*buffer
, tree node
, int spc
, int flags
,
636 if (node
== NULL_TREE
)
639 is_expr
= EXPR_P (node
);
641 if (is_stmt
&& (flags
& TDF_STMTADDR
))
642 pp_printf (buffer
, "<&%p> ", (void *)node
);
644 if ((flags
& TDF_LINENO
) && EXPR_HAS_LOCATION (node
))
645 dump_location (buffer
, EXPR_LOCATION (node
));
647 code
= TREE_CODE (node
);
651 pp_string (buffer
, "<<< error >>>");
654 case IDENTIFIER_NODE
:
655 pp_tree_identifier (buffer
, node
);
659 while (node
&& node
!= error_mark_node
)
661 if (TREE_PURPOSE (node
))
663 dump_generic_node (buffer
, TREE_PURPOSE (node
), spc
, flags
, false);
666 dump_generic_node (buffer
, TREE_VALUE (node
), spc
, flags
, false);
667 node
= TREE_CHAIN (node
);
668 if (node
&& TREE_CODE (node
) == TREE_LIST
)
677 dump_generic_node (buffer
, BINFO_TYPE (node
), spc
, flags
, false);
683 if (TREE_VEC_LENGTH (node
) > 0)
685 size_t len
= TREE_VEC_LENGTH (node
);
686 for (i
= 0; i
< len
- 1; i
++)
688 dump_generic_node (buffer
, TREE_VEC_ELT (node
, i
), spc
, flags
,
693 dump_generic_node (buffer
, TREE_VEC_ELT (node
, len
- 1), spc
,
702 case FIXED_POINT_TYPE
:
708 unsigned int quals
= TYPE_QUALS (node
);
709 enum tree_code_class tclass
;
711 if (quals
& TYPE_QUAL_CONST
)
712 pp_string (buffer
, "const ");
713 else if (quals
& TYPE_QUAL_VOLATILE
)
714 pp_string (buffer
, "volatile ");
715 else if (quals
& TYPE_QUAL_RESTRICT
)
716 pp_string (buffer
, "restrict ");
718 if (!ADDR_SPACE_GENERIC_P (TYPE_ADDR_SPACE (node
)))
720 pp_string (buffer
, "<address-space-");
721 pp_decimal_int (buffer
, TYPE_ADDR_SPACE (node
));
722 pp_string (buffer
, "> ");
725 tclass
= TREE_CODE_CLASS (TREE_CODE (node
));
727 if (tclass
== tcc_declaration
)
729 if (DECL_NAME (node
))
730 dump_decl_name (buffer
, node
, flags
);
732 pp_string (buffer
, "<unnamed type decl>");
734 else if (tclass
== tcc_type
)
736 if (TYPE_NAME (node
))
738 if (TREE_CODE (TYPE_NAME (node
)) == IDENTIFIER_NODE
)
739 pp_tree_identifier (buffer
, TYPE_NAME (node
));
740 else if (TREE_CODE (TYPE_NAME (node
)) == TYPE_DECL
741 && DECL_NAME (TYPE_NAME (node
)))
742 dump_decl_name (buffer
, TYPE_NAME (node
), flags
);
744 pp_string (buffer
, "<unnamed type>");
746 else if (TREE_CODE (node
) == VECTOR_TYPE
)
748 pp_string (buffer
, "vector");
749 pp_left_paren (buffer
);
750 pp_wide_integer (buffer
, TYPE_VECTOR_SUBPARTS (node
));
751 pp_string (buffer
, ") ");
752 dump_generic_node (buffer
, TREE_TYPE (node
), spc
, flags
, false);
754 else if (TREE_CODE (node
) == INTEGER_TYPE
)
756 if (TYPE_PRECISION (node
) == CHAR_TYPE_SIZE
)
757 pp_string (buffer
, (TYPE_UNSIGNED (node
)
760 else if (TYPE_PRECISION (node
) == SHORT_TYPE_SIZE
)
761 pp_string (buffer
, (TYPE_UNSIGNED (node
)
764 else if (TYPE_PRECISION (node
) == INT_TYPE_SIZE
)
765 pp_string (buffer
, (TYPE_UNSIGNED (node
)
768 else if (TYPE_PRECISION (node
) == LONG_TYPE_SIZE
)
769 pp_string (buffer
, (TYPE_UNSIGNED (node
)
772 else if (TYPE_PRECISION (node
) == LONG_LONG_TYPE_SIZE
)
773 pp_string (buffer
, (TYPE_UNSIGNED (node
)
774 ? "unsigned long long"
775 : "signed long long"));
776 else if (TYPE_PRECISION (node
) >= CHAR_TYPE_SIZE
777 && exact_log2 (TYPE_PRECISION (node
)) != -1)
779 pp_string (buffer
, (TYPE_UNSIGNED (node
) ? "uint" : "int"));
780 pp_decimal_int (buffer
, TYPE_PRECISION (node
));
781 pp_string (buffer
, "_t");
785 pp_string (buffer
, (TYPE_UNSIGNED (node
)
786 ? "<unnamed-unsigned:"
787 : "<unnamed-signed:"));
788 pp_decimal_int (buffer
, TYPE_PRECISION (node
));
792 else if (TREE_CODE (node
) == COMPLEX_TYPE
)
794 pp_string (buffer
, "__complex__ ");
795 dump_generic_node (buffer
, TREE_TYPE (node
), spc
, flags
, false);
797 else if (TREE_CODE (node
) == REAL_TYPE
)
799 pp_string (buffer
, "<float:");
800 pp_decimal_int (buffer
, TYPE_PRECISION (node
));
803 else if (TREE_CODE (node
) == FIXED_POINT_TYPE
)
805 pp_string (buffer
, "<fixed-point-");
806 pp_string (buffer
, TYPE_SATURATING (node
) ? "sat:" : "nonsat:");
807 pp_decimal_int (buffer
, TYPE_PRECISION (node
));
810 else if (TREE_CODE (node
) == VOID_TYPE
)
811 pp_string (buffer
, "void");
813 pp_string (buffer
, "<unnamed type>");
820 str
= (TREE_CODE (node
) == POINTER_TYPE
? "*" : "&");
822 if (TREE_TYPE (node
) == NULL
)
824 pp_string (buffer
, str
);
825 pp_string (buffer
, "<null type>");
827 else if (TREE_CODE (TREE_TYPE (node
)) == FUNCTION_TYPE
)
829 tree fnode
= TREE_TYPE (node
);
831 dump_generic_node (buffer
, TREE_TYPE (fnode
), spc
, flags
, false);
833 pp_left_paren (buffer
);
834 pp_string (buffer
, str
);
835 if (TYPE_NAME (node
) && DECL_NAME (TYPE_NAME (node
)))
836 dump_decl_name (buffer
, TYPE_NAME (node
), flags
);
837 else if (flags
& TDF_NOUID
)
838 pp_printf (buffer
, "<Txxxx>");
840 pp_printf (buffer
, "<T%x>", TYPE_UID (node
));
842 pp_right_paren (buffer
);
843 dump_function_declaration (buffer
, fnode
, spc
, flags
);
847 unsigned int quals
= TYPE_QUALS (node
);
849 dump_generic_node (buffer
, TREE_TYPE (node
), spc
, flags
, false);
851 pp_string (buffer
, str
);
853 if (quals
& TYPE_QUAL_CONST
)
854 pp_string (buffer
, " const");
855 if (quals
& TYPE_QUAL_VOLATILE
)
856 pp_string (buffer
, " volatile");
857 if (quals
& TYPE_QUAL_RESTRICT
)
858 pp_string (buffer
, " restrict");
860 if (!ADDR_SPACE_GENERIC_P (TYPE_ADDR_SPACE (node
)))
862 pp_string (buffer
, " <address-space-");
863 pp_decimal_int (buffer
, TYPE_ADDR_SPACE (node
));
867 if (TYPE_REF_CAN_ALIAS_ALL (node
))
868 pp_string (buffer
, " {ref-all}");
878 if (integer_zerop (TREE_OPERAND (node
, 1))
879 /* Dump the types of INTEGER_CSTs explicitly, for we can't
880 infer them and MEM_ATTR caching will share MEM_REFs
881 with differently-typed op0s. */
882 && TREE_CODE (TREE_OPERAND (node
, 0)) != INTEGER_CST
883 /* Released SSA_NAMES have no TREE_TYPE. */
884 && TREE_TYPE (TREE_OPERAND (node
, 0)) != NULL_TREE
885 /* Same pointer types, but ignoring POINTER_TYPE vs.
887 && (TREE_TYPE (TREE_TYPE (TREE_OPERAND (node
, 0)))
888 == TREE_TYPE (TREE_TYPE (TREE_OPERAND (node
, 1))))
889 && (TYPE_MODE (TREE_TYPE (TREE_OPERAND (node
, 0)))
890 == TYPE_MODE (TREE_TYPE (TREE_OPERAND (node
, 1))))
891 && (TYPE_REF_CAN_ALIAS_ALL (TREE_TYPE (TREE_OPERAND (node
, 0)))
892 == TYPE_REF_CAN_ALIAS_ALL (TREE_TYPE (TREE_OPERAND (node
, 1))))
893 /* Same value types ignoring qualifiers. */
894 && (TYPE_MAIN_VARIANT (TREE_TYPE (node
))
896 (TREE_TYPE (TREE_TYPE (TREE_OPERAND (node
, 1))))))
898 if (TREE_CODE (TREE_OPERAND (node
, 0)) != ADDR_EXPR
)
901 dump_generic_node (buffer
, TREE_OPERAND (node
, 0),
905 dump_generic_node (buffer
,
906 TREE_OPERAND (TREE_OPERAND (node
, 0), 0),
913 pp_string (buffer
, "MEM[");
914 pp_left_paren (buffer
);
915 ptype
= TYPE_MAIN_VARIANT (TREE_TYPE (TREE_OPERAND (node
, 1)));
916 dump_generic_node (buffer
, ptype
,
917 spc
, flags
| TDF_SLIM
, false);
918 pp_right_paren (buffer
);
919 dump_generic_node (buffer
, TREE_OPERAND (node
, 0),
921 if (!integer_zerop (TREE_OPERAND (node
, 1)))
923 pp_string (buffer
, " + ");
924 dump_generic_node (buffer
, TREE_OPERAND (node
, 1),
927 pp_right_bracket (buffer
);
934 const char *sep
= "";
937 pp_string (buffer
, "MEM[");
939 if (TREE_CODE (TMR_BASE (node
)) == ADDR_EXPR
)
941 pp_string (buffer
, sep
);
943 pp_string (buffer
, "symbol: ");
944 dump_generic_node (buffer
, TREE_OPERAND (TMR_BASE (node
), 0),
949 pp_string (buffer
, sep
);
951 pp_string (buffer
, "base: ");
952 dump_generic_node (buffer
, TMR_BASE (node
), spc
, flags
, false);
954 tmp
= TMR_INDEX2 (node
);
957 pp_string (buffer
, sep
);
959 pp_string (buffer
, "base: ");
960 dump_generic_node (buffer
, tmp
, spc
, flags
, false);
962 tmp
= TMR_INDEX (node
);
965 pp_string (buffer
, sep
);
967 pp_string (buffer
, "index: ");
968 dump_generic_node (buffer
, tmp
, spc
, flags
, false);
970 tmp
= TMR_STEP (node
);
973 pp_string (buffer
, sep
);
975 pp_string (buffer
, "step: ");
976 dump_generic_node (buffer
, tmp
, spc
, flags
, false);
978 tmp
= TMR_OFFSET (node
);
981 pp_string (buffer
, sep
);
983 pp_string (buffer
, "offset: ");
984 dump_generic_node (buffer
, tmp
, spc
, flags
, false);
986 pp_right_bracket (buffer
);
994 /* Print the innermost component type. */
995 for (tmp
= TREE_TYPE (node
); TREE_CODE (tmp
) == ARRAY_TYPE
;
996 tmp
= TREE_TYPE (tmp
))
998 dump_generic_node (buffer
, tmp
, spc
, flags
, false);
1000 /* Print the dimensions. */
1001 for (tmp
= node
; TREE_CODE (tmp
) == ARRAY_TYPE
; tmp
= TREE_TYPE (tmp
))
1002 dump_array_domain (buffer
, TYPE_DOMAIN (tmp
), spc
, flags
);
1008 case QUAL_UNION_TYPE
:
1010 unsigned int quals
= TYPE_QUALS (node
);
1012 if (quals
& TYPE_QUAL_CONST
)
1013 pp_string (buffer
, "const ");
1014 if (quals
& TYPE_QUAL_VOLATILE
)
1015 pp_string (buffer
, "volatile ");
1017 /* Print the name of the structure. */
1018 if (TREE_CODE (node
) == RECORD_TYPE
)
1019 pp_string (buffer
, "struct ");
1020 else if (TREE_CODE (node
) == UNION_TYPE
)
1021 pp_string (buffer
, "union ");
1023 if (TYPE_NAME (node
))
1024 dump_generic_node (buffer
, TYPE_NAME (node
), spc
, flags
, false);
1025 else if (!(flags
& TDF_SLIM
))
1026 /* FIXME: If we eliminate the 'else' above and attempt
1027 to show the fields for named types, we may get stuck
1028 following a cycle of pointers to structs. The alleged
1029 self-reference check in print_struct_decl will not detect
1030 cycles involving more than one pointer or struct type. */
1031 print_struct_decl (buffer
, node
, spc
, flags
);
1040 if (TREE_CODE (TREE_TYPE (node
)) == POINTER_TYPE
)
1042 /* In the case of a pointer, one may want to divide by the
1043 size of the pointed-to type. Unfortunately, this not
1044 straightforward. The C front-end maps expressions
1049 in such a way that the two INTEGER_CST nodes for "5" have
1050 different values but identical types. In the latter
1051 case, the 5 is multiplied by sizeof (int) in c-common.c
1052 (pointer_int_sum) to convert it to a byte address, and
1053 yet the type of the node is left unchanged. Argh. What
1054 is consistent though is that the number value corresponds
1055 to bytes (UNITS) offset.
1057 NB: Neither of the following divisors can be trivially
1058 used to recover the original literal:
1060 TREE_INT_CST_LOW (TYPE_SIZE_UNIT (TREE_TYPE (node)))
1061 TYPE_PRECISION (TREE_TYPE (TREE_TYPE (node))) */
1062 pp_wide_integer (buffer
, TREE_INT_CST_LOW (node
));
1063 pp_string (buffer
, "B"); /* pseudo-unit */
1065 else if (host_integerp (node
, 0))
1066 pp_wide_integer (buffer
, TREE_INT_CST_LOW (node
));
1067 else if (host_integerp (node
, 1))
1068 pp_unsigned_wide_integer (buffer
, TREE_INT_CST_LOW (node
));
1072 unsigned HOST_WIDE_INT low
= TREE_INT_CST_LOW (val
);
1073 HOST_WIDE_INT high
= TREE_INT_CST_HIGH (val
);
1075 if (tree_int_cst_sgn (val
) < 0)
1078 high
= ~high
+ !low
;
1081 /* Would "%x%0*x" or "%x%*0x" get zero-padding on all
1083 sprintf (pp_buffer (buffer
)->digit_buffer
,
1084 HOST_WIDE_INT_PRINT_DOUBLE_HEX
,
1085 (unsigned HOST_WIDE_INT
) high
, low
);
1086 pp_string (buffer
, pp_buffer (buffer
)->digit_buffer
);
1091 /* Code copied from print_node. */
1094 if (TREE_OVERFLOW (node
))
1095 pp_string (buffer
, " overflow");
1097 #if !defined(REAL_IS_NOT_DOUBLE) || defined(REAL_ARITHMETIC)
1098 d
= TREE_REAL_CST (node
);
1099 if (REAL_VALUE_ISINF (d
))
1100 pp_string (buffer
, REAL_VALUE_NEGATIVE (d
) ? " -Inf" : " Inf");
1101 else if (REAL_VALUE_ISNAN (d
))
1102 pp_string (buffer
, " Nan");
1106 real_to_decimal (string
, &d
, sizeof (string
), 0, 1);
1107 pp_string (buffer
, string
);
1112 unsigned char *p
= (unsigned char *) &TREE_REAL_CST (node
);
1113 pp_string (buffer
, "0x");
1114 for (i
= 0; i
< sizeof TREE_REAL_CST (node
); i
++)
1115 output_formatted_integer (buffer
, "%02x", *p
++);
1124 fixed_to_decimal (string
, TREE_FIXED_CST_PTR (node
), sizeof (string
));
1125 pp_string (buffer
, string
);
1130 pp_string (buffer
, "__complex__ (");
1131 dump_generic_node (buffer
, TREE_REALPART (node
), spc
, flags
, false);
1132 pp_string (buffer
, ", ");
1133 dump_generic_node (buffer
, TREE_IMAGPART (node
), spc
, flags
, false);
1134 pp_right_paren (buffer
);
1138 pp_string (buffer
, "\"");
1139 pretty_print_string (buffer
, TREE_STRING_POINTER (node
));
1140 pp_string (buffer
, "\"");
1146 pp_string (buffer
, "{ ");
1147 for (i
= 0; i
< VECTOR_CST_NELTS (node
); ++i
)
1150 pp_string (buffer
, ", ");
1151 dump_generic_node (buffer
, VECTOR_CST_ELT (node
, i
),
1154 pp_string (buffer
, " }");
1160 dump_generic_node (buffer
, TREE_TYPE (node
), spc
, flags
, false);
1162 if (TREE_CODE (node
) == METHOD_TYPE
)
1164 if (TYPE_METHOD_BASETYPE (node
))
1165 dump_decl_name (buffer
, TYPE_NAME (TYPE_METHOD_BASETYPE (node
)),
1168 pp_string (buffer
, "<null method basetype>");
1169 pp_colon_colon (buffer
);
1171 if (TYPE_NAME (node
) && DECL_NAME (TYPE_NAME (node
)))
1172 dump_decl_name (buffer
, TYPE_NAME (node
), flags
);
1173 else if (flags
& TDF_NOUID
)
1174 pp_printf (buffer
, "<Txxxx>");
1176 pp_printf (buffer
, "<T%x>", TYPE_UID (node
));
1177 dump_function_declaration (buffer
, node
, spc
, flags
);
1182 dump_decl_name (buffer
, node
, flags
);
1186 if (DECL_NAME (node
))
1187 dump_decl_name (buffer
, node
, flags
);
1188 else if (LABEL_DECL_UID (node
) != -1)
1189 pp_printf (buffer
, "<L%d>", (int) LABEL_DECL_UID (node
));
1192 if (flags
& TDF_NOUID
)
1193 pp_string (buffer
, "<D.xxxx>");
1195 pp_printf (buffer
, "<D.%u>", DECL_UID (node
));
1200 if (DECL_IS_BUILTIN (node
))
1202 /* Don't print the declaration of built-in types. */
1205 if (DECL_NAME (node
))
1206 dump_decl_name (buffer
, node
, flags
);
1207 else if (TYPE_NAME (TREE_TYPE (node
)) != node
)
1209 if ((TREE_CODE (TREE_TYPE (node
)) == RECORD_TYPE
1210 || TREE_CODE (TREE_TYPE (node
)) == UNION_TYPE
)
1211 && TYPE_METHODS (TREE_TYPE (node
)))
1213 /* The type is a c++ class: all structures have at least
1215 pp_string (buffer
, "class ");
1216 dump_generic_node (buffer
, TREE_TYPE (node
), spc
, flags
, false);
1221 (TREE_CODE (TREE_TYPE (node
)) == UNION_TYPE
1222 ? "union" : "struct "));
1223 dump_generic_node (buffer
, TREE_TYPE (node
), spc
, flags
, false);
1227 pp_string (buffer
, "<anon>");
1233 case DEBUG_EXPR_DECL
:
1234 case NAMESPACE_DECL
:
1235 dump_decl_name (buffer
, node
, flags
);
1239 pp_string (buffer
, "<retval>");
1243 op0
= TREE_OPERAND (node
, 0);
1246 && (TREE_CODE (op0
) == INDIRECT_REF
1247 || (TREE_CODE (op0
) == MEM_REF
1248 && TREE_CODE (TREE_OPERAND (op0
, 0)) != ADDR_EXPR
1249 && integer_zerop (TREE_OPERAND (op0
, 1))
1250 /* Dump the types of INTEGER_CSTs explicitly, for we
1251 can't infer them and MEM_ATTR caching will share
1252 MEM_REFs with differently-typed op0s. */
1253 && TREE_CODE (TREE_OPERAND (op0
, 0)) != INTEGER_CST
1254 /* Released SSA_NAMES have no TREE_TYPE. */
1255 && TREE_TYPE (TREE_OPERAND (op0
, 0)) != NULL_TREE
1256 /* Same pointer types, but ignoring POINTER_TYPE vs.
1258 && (TREE_TYPE (TREE_TYPE (TREE_OPERAND (op0
, 0)))
1259 == TREE_TYPE (TREE_TYPE (TREE_OPERAND (op0
, 1))))
1260 && (TYPE_MODE (TREE_TYPE (TREE_OPERAND (op0
, 0)))
1261 == TYPE_MODE (TREE_TYPE (TREE_OPERAND (op0
, 1))))
1262 && (TYPE_REF_CAN_ALIAS_ALL (TREE_TYPE (TREE_OPERAND (op0
, 0)))
1263 == TYPE_REF_CAN_ALIAS_ALL (TREE_TYPE (TREE_OPERAND (op0
, 1))))
1264 /* Same value types ignoring qualifiers. */
1265 && (TYPE_MAIN_VARIANT (TREE_TYPE (op0
))
1266 == TYPE_MAIN_VARIANT
1267 (TREE_TYPE (TREE_TYPE (TREE_OPERAND (op0
, 1))))))))
1269 op0
= TREE_OPERAND (op0
, 0);
1272 if (op_prio (op0
) < op_prio (node
))
1273 pp_left_paren (buffer
);
1274 dump_generic_node (buffer
, op0
, spc
, flags
, false);
1275 if (op_prio (op0
) < op_prio (node
))
1276 pp_right_paren (buffer
);
1277 pp_string (buffer
, str
);
1278 dump_generic_node (buffer
, TREE_OPERAND (node
, 1), spc
, flags
, false);
1279 op0
= component_ref_field_offset (node
);
1280 if (op0
&& TREE_CODE (op0
) != INTEGER_CST
)
1282 pp_string (buffer
, "{off: ");
1283 dump_generic_node (buffer
, op0
, spc
, flags
, false);
1284 pp_right_brace (buffer
);
1289 pp_string (buffer
, "BIT_FIELD_REF <");
1290 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
1291 pp_string (buffer
, ", ");
1292 dump_generic_node (buffer
, TREE_OPERAND (node
, 1), spc
, flags
, false);
1293 pp_string (buffer
, ", ");
1294 dump_generic_node (buffer
, TREE_OPERAND (node
, 2), spc
, flags
, false);
1295 pp_greater (buffer
);
1299 case ARRAY_RANGE_REF
:
1300 op0
= TREE_OPERAND (node
, 0);
1301 if (op_prio (op0
) < op_prio (node
))
1302 pp_left_paren (buffer
);
1303 dump_generic_node (buffer
, op0
, spc
, flags
, false);
1304 if (op_prio (op0
) < op_prio (node
))
1305 pp_right_paren (buffer
);
1306 pp_left_bracket (buffer
);
1307 dump_generic_node (buffer
, TREE_OPERAND (node
, 1), spc
, flags
, false);
1308 if (TREE_CODE (node
) == ARRAY_RANGE_REF
)
1309 pp_string (buffer
, " ...");
1310 pp_right_bracket (buffer
);
1312 op0
= array_ref_low_bound (node
);
1313 op1
= array_ref_element_size (node
);
1315 if (!integer_zerop (op0
)
1316 || TREE_OPERAND (node
, 2)
1317 || TREE_OPERAND (node
, 3))
1319 pp_string (buffer
, "{lb: ");
1320 dump_generic_node (buffer
, op0
, spc
, flags
, false);
1321 pp_string (buffer
, " sz: ");
1322 dump_generic_node (buffer
, op1
, spc
, flags
, false);
1323 pp_right_brace (buffer
);
1329 unsigned HOST_WIDE_INT ix
;
1331 bool is_struct_init
= false;
1332 bool is_array_init
= false;
1333 double_int curidx
= double_int_zero
;
1334 pp_left_brace (buffer
);
1335 if (TREE_CLOBBER_P (node
))
1336 pp_string (buffer
, "CLOBBER");
1337 else if (TREE_CODE (TREE_TYPE (node
)) == RECORD_TYPE
1338 || TREE_CODE (TREE_TYPE (node
)) == UNION_TYPE
)
1339 is_struct_init
= true;
1340 else if (TREE_CODE (TREE_TYPE (node
)) == ARRAY_TYPE
1341 && TYPE_DOMAIN (TREE_TYPE (node
))
1342 && TYPE_MIN_VALUE (TYPE_DOMAIN (TREE_TYPE (node
)))
1343 && TREE_CODE (TYPE_MIN_VALUE (TYPE_DOMAIN (TREE_TYPE (node
))))
1346 tree minv
= TYPE_MIN_VALUE (TYPE_DOMAIN (TREE_TYPE (node
)));
1347 is_array_init
= true;
1348 curidx
= tree_to_double_int (minv
);
1350 FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (node
), ix
, field
, val
)
1357 dump_generic_node (buffer
, field
, spc
, flags
, false);
1360 else if (is_array_init
1361 && (TREE_CODE (field
) != INTEGER_CST
1362 || tree_to_double_int (field
) != curidx
))
1364 pp_left_bracket (buffer
);
1365 if (TREE_CODE (field
) == RANGE_EXPR
)
1367 dump_generic_node (buffer
, TREE_OPERAND (field
, 0), spc
,
1369 pp_string (buffer
, " ... ");
1370 dump_generic_node (buffer
, TREE_OPERAND (field
, 1), spc
,
1372 if (TREE_CODE (TREE_OPERAND (field
, 1)) == INTEGER_CST
)
1373 curidx
= tree_to_double_int (TREE_OPERAND (field
, 1));
1376 dump_generic_node (buffer
, field
, spc
, flags
, false);
1377 if (TREE_CODE (field
) == INTEGER_CST
)
1378 curidx
= tree_to_double_int (field
);
1379 pp_string (buffer
, "]=");
1383 curidx
+= double_int_one
;
1384 if (val
&& TREE_CODE (val
) == ADDR_EXPR
)
1385 if (TREE_CODE (TREE_OPERAND (val
, 0)) == FUNCTION_DECL
)
1386 val
= TREE_OPERAND (val
, 0);
1387 if (val
&& TREE_CODE (val
) == FUNCTION_DECL
)
1388 dump_decl_name (buffer
, val
, flags
);
1390 dump_generic_node (buffer
, val
, spc
, flags
, false);
1391 if (ix
!= vec_safe_length (CONSTRUCTOR_ELTS (node
)) - 1)
1397 pp_right_brace (buffer
);
1404 if (flags
& TDF_SLIM
)
1406 pp_string (buffer
, "<COMPOUND_EXPR>");
1410 dump_generic_node (buffer
, TREE_OPERAND (node
, 0),
1411 spc
, flags
, !(flags
& TDF_SLIM
));
1412 if (flags
& TDF_SLIM
)
1413 newline_and_indent (buffer
, spc
);
1420 for (tp
= &TREE_OPERAND (node
, 1);
1421 TREE_CODE (*tp
) == COMPOUND_EXPR
;
1422 tp
= &TREE_OPERAND (*tp
, 1))
1424 dump_generic_node (buffer
, TREE_OPERAND (*tp
, 0),
1425 spc
, flags
, !(flags
& TDF_SLIM
));
1426 if (flags
& TDF_SLIM
)
1427 newline_and_indent (buffer
, spc
);
1435 dump_generic_node (buffer
, *tp
, spc
, flags
, !(flags
& TDF_SLIM
));
1439 case STATEMENT_LIST
:
1441 tree_stmt_iterator si
;
1444 if (flags
& TDF_SLIM
)
1446 pp_string (buffer
, "<STATEMENT_LIST>");
1450 for (si
= tsi_start (node
); !tsi_end_p (si
); tsi_next (&si
))
1453 newline_and_indent (buffer
, spc
);
1456 dump_generic_node (buffer
, tsi_stmt (si
), spc
, flags
, true);
1463 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
,
1468 dump_generic_node (buffer
, TREE_OPERAND (node
, 1), spc
, flags
,
1473 pp_string (buffer
, "TARGET_EXPR <");
1474 dump_generic_node (buffer
, TARGET_EXPR_SLOT (node
), spc
, flags
, false);
1477 dump_generic_node (buffer
, TARGET_EXPR_INITIAL (node
), spc
, flags
, false);
1478 pp_greater (buffer
);
1482 print_declaration (buffer
, DECL_EXPR_DECL (node
), spc
, flags
);
1487 if (TREE_TYPE (node
) == NULL
|| TREE_TYPE (node
) == void_type_node
)
1489 pp_string (buffer
, "if (");
1490 dump_generic_node (buffer
, COND_EXPR_COND (node
), spc
, flags
, false);
1491 pp_right_paren (buffer
);
1492 /* The lowered cond_exprs should always be printed in full. */
1493 if (COND_EXPR_THEN (node
)
1494 && (IS_EMPTY_STMT (COND_EXPR_THEN (node
))
1495 || TREE_CODE (COND_EXPR_THEN (node
)) == GOTO_EXPR
)
1496 && COND_EXPR_ELSE (node
)
1497 && (IS_EMPTY_STMT (COND_EXPR_ELSE (node
))
1498 || TREE_CODE (COND_EXPR_ELSE (node
)) == GOTO_EXPR
))
1501 dump_generic_node (buffer
, COND_EXPR_THEN (node
),
1503 if (!IS_EMPTY_STMT (COND_EXPR_ELSE (node
)))
1505 pp_string (buffer
, " else ");
1506 dump_generic_node (buffer
, COND_EXPR_ELSE (node
),
1510 else if (!(flags
& TDF_SLIM
))
1512 /* Output COND_EXPR_THEN. */
1513 if (COND_EXPR_THEN (node
))
1515 newline_and_indent (buffer
, spc
+2);
1516 pp_left_brace (buffer
);
1517 newline_and_indent (buffer
, spc
+4);
1518 dump_generic_node (buffer
, COND_EXPR_THEN (node
), spc
+4,
1520 newline_and_indent (buffer
, spc
+2);
1521 pp_right_brace (buffer
);
1524 /* Output COND_EXPR_ELSE. */
1525 if (COND_EXPR_ELSE (node
)
1526 && !IS_EMPTY_STMT (COND_EXPR_ELSE (node
)))
1528 newline_and_indent (buffer
, spc
);
1529 pp_string (buffer
, "else");
1530 newline_and_indent (buffer
, spc
+2);
1531 pp_left_brace (buffer
);
1532 newline_and_indent (buffer
, spc
+4);
1533 dump_generic_node (buffer
, COND_EXPR_ELSE (node
), spc
+4,
1535 newline_and_indent (buffer
, spc
+2);
1536 pp_right_brace (buffer
);
1543 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
1545 pp_question (buffer
);
1547 dump_generic_node (buffer
, TREE_OPERAND (node
, 1), spc
, flags
, false);
1551 dump_generic_node (buffer
, TREE_OPERAND (node
, 2), spc
, flags
, false);
1556 pp_left_brace (buffer
);
1557 if (!(flags
& TDF_SLIM
))
1559 if (BIND_EXPR_VARS (node
))
1561 pp_newline (buffer
);
1563 for (op0
= BIND_EXPR_VARS (node
); op0
; op0
= DECL_CHAIN (op0
))
1565 print_declaration (buffer
, op0
, spc
+2, flags
);
1566 pp_newline (buffer
);
1570 newline_and_indent (buffer
, spc
+2);
1571 dump_generic_node (buffer
, BIND_EXPR_BODY (node
), spc
+2, flags
, true);
1572 newline_and_indent (buffer
, spc
);
1573 pp_right_brace (buffer
);
1579 print_call_name (buffer
, CALL_EXPR_FN (node
), flags
);
1581 /* Print parameters. */
1583 pp_left_paren (buffer
);
1586 call_expr_arg_iterator iter
;
1587 FOR_EACH_CALL_EXPR_ARG (arg
, iter
, node
)
1589 dump_generic_node (buffer
, arg
, spc
, flags
, false);
1590 if (more_call_expr_args_p (&iter
))
1597 if (CALL_EXPR_VA_ARG_PACK (node
))
1599 if (call_expr_nargs (node
) > 0)
1604 pp_string (buffer
, "__builtin_va_arg_pack ()");
1606 pp_right_paren (buffer
);
1608 op1
= CALL_EXPR_STATIC_CHAIN (node
);
1611 pp_string (buffer
, " [static-chain: ");
1612 dump_generic_node (buffer
, op1
, spc
, flags
, false);
1613 pp_right_bracket (buffer
);
1616 if (CALL_EXPR_RETURN_SLOT_OPT (node
))
1617 pp_string (buffer
, " [return slot optimization]");
1618 if (CALL_EXPR_TAILCALL (node
))
1619 pp_string (buffer
, " [tail call]");
1622 case WITH_CLEANUP_EXPR
:
1626 case CLEANUP_POINT_EXPR
:
1627 pp_string (buffer
, "<<cleanup_point ");
1628 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
1629 pp_string (buffer
, ">>");
1632 case PLACEHOLDER_EXPR
:
1633 pp_string (buffer
, "<PLACEHOLDER_EXPR ");
1634 dump_generic_node (buffer
, TREE_TYPE (node
), spc
, flags
, false);
1635 pp_greater (buffer
);
1638 /* Binary arithmetic and logic expressions. */
1639 case WIDEN_SUM_EXPR
:
1640 case WIDEN_MULT_EXPR
:
1642 case MULT_HIGHPART_EXPR
:
1644 case POINTER_PLUS_EXPR
:
1646 case TRUNC_DIV_EXPR
:
1648 case FLOOR_DIV_EXPR
:
1649 case ROUND_DIV_EXPR
:
1650 case TRUNC_MOD_EXPR
:
1652 case FLOOR_MOD_EXPR
:
1653 case ROUND_MOD_EXPR
:
1655 case EXACT_DIV_EXPR
:
1660 case VEC_LSHIFT_EXPR
:
1661 case VEC_RSHIFT_EXPR
:
1662 case WIDEN_LSHIFT_EXPR
:
1666 case TRUTH_ANDIF_EXPR
:
1667 case TRUTH_ORIF_EXPR
:
1668 case TRUTH_AND_EXPR
:
1670 case TRUTH_XOR_EXPR
:
1684 case UNORDERED_EXPR
:
1686 const char *op
= op_symbol (node
);
1687 op0
= TREE_OPERAND (node
, 0);
1688 op1
= TREE_OPERAND (node
, 1);
1690 /* When the operands are expressions with less priority,
1691 keep semantics of the tree representation. */
1692 if (op_prio (op0
) <= op_prio (node
))
1694 pp_left_paren (buffer
);
1695 dump_generic_node (buffer
, op0
, spc
, flags
, false);
1696 pp_right_paren (buffer
);
1699 dump_generic_node (buffer
, op0
, spc
, flags
, false);
1702 pp_string (buffer
, op
);
1705 /* When the operands are expressions with less priority,
1706 keep semantics of the tree representation. */
1707 if (op_prio (op1
) <= op_prio (node
))
1709 pp_left_paren (buffer
);
1710 dump_generic_node (buffer
, op1
, spc
, flags
, false);
1711 pp_right_paren (buffer
);
1714 dump_generic_node (buffer
, op1
, spc
, flags
, false);
1718 /* Unary arithmetic and logic expressions. */
1721 case TRUTH_NOT_EXPR
:
1723 case PREDECREMENT_EXPR
:
1724 case PREINCREMENT_EXPR
:
1726 if (TREE_CODE (node
) == ADDR_EXPR
1727 && (TREE_CODE (TREE_OPERAND (node
, 0)) == STRING_CST
1728 || TREE_CODE (TREE_OPERAND (node
, 0)) == FUNCTION_DECL
))
1729 ; /* Do not output '&' for strings and function pointers. */
1731 pp_string (buffer
, op_symbol (node
));
1733 if (op_prio (TREE_OPERAND (node
, 0)) < op_prio (node
))
1735 pp_left_paren (buffer
);
1736 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
1737 pp_right_paren (buffer
);
1740 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
1743 case POSTDECREMENT_EXPR
:
1744 case POSTINCREMENT_EXPR
:
1745 if (op_prio (TREE_OPERAND (node
, 0)) < op_prio (node
))
1747 pp_left_paren (buffer
);
1748 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
1749 pp_right_paren (buffer
);
1752 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
1753 pp_string (buffer
, op_symbol (node
));
1757 pp_string (buffer
, "MIN_EXPR <");
1758 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
1759 pp_string (buffer
, ", ");
1760 dump_generic_node (buffer
, TREE_OPERAND (node
, 1), spc
, flags
, false);
1761 pp_greater (buffer
);
1765 pp_string (buffer
, "MAX_EXPR <");
1766 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
1767 pp_string (buffer
, ", ");
1768 dump_generic_node (buffer
, TREE_OPERAND (node
, 1), spc
, flags
, false);
1769 pp_greater (buffer
);
1773 pp_string (buffer
, "ABS_EXPR <");
1774 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
1775 pp_greater (buffer
);
1782 case ADDR_SPACE_CONVERT_EXPR
:
1783 case FIXED_CONVERT_EXPR
:
1784 case FIX_TRUNC_EXPR
:
1787 type
= TREE_TYPE (node
);
1788 op0
= TREE_OPERAND (node
, 0);
1789 if (type
!= TREE_TYPE (op0
))
1791 pp_left_paren (buffer
);
1792 dump_generic_node (buffer
, type
, spc
, flags
, false);
1793 pp_string (buffer
, ") ");
1795 if (op_prio (op0
) < op_prio (node
))
1796 pp_left_paren (buffer
);
1797 dump_generic_node (buffer
, op0
, spc
, flags
, false);
1798 if (op_prio (op0
) < op_prio (node
))
1799 pp_right_paren (buffer
);
1802 case VIEW_CONVERT_EXPR
:
1803 pp_string (buffer
, "VIEW_CONVERT_EXPR<");
1804 dump_generic_node (buffer
, TREE_TYPE (node
), spc
, flags
, false);
1805 pp_string (buffer
, ">(");
1806 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
1807 pp_right_paren (buffer
);
1811 pp_string (buffer
, "((");
1812 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
1813 pp_string (buffer
, "))");
1816 case NON_LVALUE_EXPR
:
1817 pp_string (buffer
, "NON_LVALUE_EXPR <");
1818 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
1819 pp_greater (buffer
);
1823 pp_string (buffer
, "SAVE_EXPR <");
1824 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
1825 pp_greater (buffer
);
1829 pp_string (buffer
, "COMPLEX_EXPR <");
1830 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
1831 pp_string (buffer
, ", ");
1832 dump_generic_node (buffer
, TREE_OPERAND (node
, 1), spc
, flags
, false);
1833 pp_greater (buffer
);
1837 pp_string (buffer
, "CONJ_EXPR <");
1838 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
1839 pp_greater (buffer
);
1843 pp_string (buffer
, "REALPART_EXPR <");
1844 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
1845 pp_greater (buffer
);
1849 pp_string (buffer
, "IMAGPART_EXPR <");
1850 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
1851 pp_greater (buffer
);
1855 pp_string (buffer
, "VA_ARG_EXPR <");
1856 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
1857 pp_greater (buffer
);
1860 case TRY_FINALLY_EXPR
:
1861 case TRY_CATCH_EXPR
:
1862 pp_string (buffer
, "try");
1863 newline_and_indent (buffer
, spc
+2);
1864 pp_left_brace (buffer
);
1865 newline_and_indent (buffer
, spc
+4);
1866 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
+4, flags
, true);
1867 newline_and_indent (buffer
, spc
+2);
1868 pp_right_brace (buffer
);
1869 newline_and_indent (buffer
, spc
);
1871 (TREE_CODE (node
) == TRY_CATCH_EXPR
) ? "catch" : "finally");
1872 newline_and_indent (buffer
, spc
+2);
1873 pp_left_brace (buffer
);
1874 newline_and_indent (buffer
, spc
+4);
1875 dump_generic_node (buffer
, TREE_OPERAND (node
, 1), spc
+4, flags
, true);
1876 newline_and_indent (buffer
, spc
+2);
1877 pp_right_brace (buffer
);
1882 pp_string (buffer
, "catch (");
1883 dump_generic_node (buffer
, CATCH_TYPES (node
), spc
+2, flags
, false);
1884 pp_right_paren (buffer
);
1885 newline_and_indent (buffer
, spc
+2);
1886 pp_left_brace (buffer
);
1887 newline_and_indent (buffer
, spc
+4);
1888 dump_generic_node (buffer
, CATCH_BODY (node
), spc
+4, flags
, true);
1889 newline_and_indent (buffer
, spc
+2);
1890 pp_right_brace (buffer
);
1894 case EH_FILTER_EXPR
:
1895 pp_string (buffer
, "<<<eh_filter (");
1896 dump_generic_node (buffer
, EH_FILTER_TYPES (node
), spc
+2, flags
, false);
1897 pp_string (buffer
, ")>>>");
1898 newline_and_indent (buffer
, spc
+2);
1899 pp_left_brace (buffer
);
1900 newline_and_indent (buffer
, spc
+4);
1901 dump_generic_node (buffer
, EH_FILTER_FAILURE (node
), spc
+4, flags
, true);
1902 newline_and_indent (buffer
, spc
+2);
1903 pp_right_brace (buffer
);
1908 op0
= TREE_OPERAND (node
, 0);
1909 /* If this is for break or continue, don't bother printing it. */
1910 if (DECL_NAME (op0
))
1912 const char *name
= IDENTIFIER_POINTER (DECL_NAME (op0
));
1913 if (strcmp (name
, "break") == 0
1914 || strcmp (name
, "continue") == 0)
1917 dump_generic_node (buffer
, op0
, spc
, flags
, false);
1919 if (DECL_NONLOCAL (op0
))
1920 pp_string (buffer
, " [non-local]");
1924 pp_string (buffer
, "while (1)");
1925 if (!(flags
& TDF_SLIM
))
1927 newline_and_indent (buffer
, spc
+2);
1928 pp_left_brace (buffer
);
1929 newline_and_indent (buffer
, spc
+4);
1930 dump_generic_node (buffer
, LOOP_EXPR_BODY (node
), spc
+4, flags
, true);
1931 newline_and_indent (buffer
, spc
+2);
1932 pp_right_brace (buffer
);
1938 pp_string (buffer
, "// predicted ");
1939 if (PREDICT_EXPR_OUTCOME (node
))
1940 pp_string (buffer
, "likely by ");
1942 pp_string (buffer
, "unlikely by ");
1943 pp_string (buffer
, predictor_name (PREDICT_EXPR_PREDICTOR (node
)));
1944 pp_string (buffer
, " predictor.");
1948 pp_string (buffer
, "return");
1949 op0
= TREE_OPERAND (node
, 0);
1953 if (TREE_CODE (op0
) == MODIFY_EXPR
)
1954 dump_generic_node (buffer
, TREE_OPERAND (op0
, 1),
1957 dump_generic_node (buffer
, op0
, spc
, flags
, false);
1962 pp_string (buffer
, "if (");
1963 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
1964 pp_string (buffer
, ") break");
1968 pp_string (buffer
, "switch (");
1969 dump_generic_node (buffer
, SWITCH_COND (node
), spc
, flags
, false);
1970 pp_right_paren (buffer
);
1971 if (!(flags
& TDF_SLIM
))
1973 newline_and_indent (buffer
, spc
+2);
1974 pp_left_brace (buffer
);
1975 if (SWITCH_BODY (node
))
1977 newline_and_indent (buffer
, spc
+4);
1978 dump_generic_node (buffer
, SWITCH_BODY (node
), spc
+4, flags
,
1983 tree vec
= SWITCH_LABELS (node
);
1984 size_t i
, n
= TREE_VEC_LENGTH (vec
);
1985 for (i
= 0; i
< n
; ++i
)
1987 tree elt
= TREE_VEC_ELT (vec
, i
);
1988 newline_and_indent (buffer
, spc
+4);
1991 dump_generic_node (buffer
, elt
, spc
+4, flags
, false);
1992 pp_string (buffer
, " goto ");
1993 dump_generic_node (buffer
, CASE_LABEL (elt
), spc
+4,
1995 pp_semicolon (buffer
);
1998 pp_string (buffer
, "case ???: goto ???;");
2001 newline_and_indent (buffer
, spc
+2);
2002 pp_right_brace (buffer
);
2008 op0
= GOTO_DESTINATION (node
);
2009 if (TREE_CODE (op0
) != SSA_NAME
&& DECL_P (op0
) && DECL_NAME (op0
))
2011 const char *name
= IDENTIFIER_POINTER (DECL_NAME (op0
));
2012 if (strcmp (name
, "break") == 0
2013 || strcmp (name
, "continue") == 0)
2015 pp_string (buffer
, name
);
2019 pp_string (buffer
, "goto ");
2020 dump_generic_node (buffer
, op0
, spc
, flags
, false);
2024 pp_string (buffer
, "__asm__");
2025 if (ASM_VOLATILE_P (node
))
2026 pp_string (buffer
, " __volatile__");
2027 pp_left_paren (buffer
);
2028 dump_generic_node (buffer
, ASM_STRING (node
), spc
, flags
, false);
2030 dump_generic_node (buffer
, ASM_OUTPUTS (node
), spc
, flags
, false);
2032 dump_generic_node (buffer
, ASM_INPUTS (node
), spc
, flags
, false);
2033 if (ASM_CLOBBERS (node
))
2036 dump_generic_node (buffer
, ASM_CLOBBERS (node
), spc
, flags
, false);
2038 pp_right_paren (buffer
);
2041 case CASE_LABEL_EXPR
:
2042 if (CASE_LOW (node
) && CASE_HIGH (node
))
2044 pp_string (buffer
, "case ");
2045 dump_generic_node (buffer
, CASE_LOW (node
), spc
, flags
, false);
2046 pp_string (buffer
, " ... ");
2047 dump_generic_node (buffer
, CASE_HIGH (node
), spc
, flags
, false);
2049 else if (CASE_LOW (node
))
2051 pp_string (buffer
, "case ");
2052 dump_generic_node (buffer
, CASE_LOW (node
), spc
, flags
, false);
2055 pp_string (buffer
, "default");
2060 pp_string (buffer
, "OBJ_TYPE_REF(");
2061 dump_generic_node (buffer
, OBJ_TYPE_REF_EXPR (node
), spc
, flags
, false);
2062 pp_semicolon (buffer
);
2063 dump_generic_node (buffer
, OBJ_TYPE_REF_OBJECT (node
), spc
, flags
, false);
2065 dump_generic_node (buffer
, OBJ_TYPE_REF_TOKEN (node
), spc
, flags
, false);
2066 pp_right_paren (buffer
);
2070 if (SSA_NAME_IDENTIFIER (node
))
2071 dump_generic_node (buffer
, SSA_NAME_IDENTIFIER (node
),
2073 pp_underscore (buffer
);
2074 pp_decimal_int (buffer
, SSA_NAME_VERSION (node
));
2075 if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (node
))
2076 pp_string (buffer
, "(ab)");
2077 else if (SSA_NAME_IS_DEFAULT_DEF (node
))
2078 pp_string (buffer
, "(D)");
2081 case WITH_SIZE_EXPR
:
2082 pp_string (buffer
, "WITH_SIZE_EXPR <");
2083 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
2084 pp_string (buffer
, ", ");
2085 dump_generic_node (buffer
, TREE_OPERAND (node
, 1), spc
, flags
, false);
2086 pp_greater (buffer
);
2090 pp_string (buffer
, "ASSERT_EXPR <");
2091 dump_generic_node (buffer
, ASSERT_EXPR_VAR (node
), spc
, flags
, false);
2092 pp_string (buffer
, ", ");
2093 dump_generic_node (buffer
, ASSERT_EXPR_COND (node
), spc
, flags
, false);
2094 pp_greater (buffer
);
2098 pp_string (buffer
, "scev_known");
2101 case SCEV_NOT_KNOWN
:
2102 pp_string (buffer
, "scev_not_known");
2105 case POLYNOMIAL_CHREC
:
2106 pp_left_brace (buffer
);
2107 dump_generic_node (buffer
, CHREC_LEFT (node
), spc
, flags
, false);
2108 pp_string (buffer
, ", +, ");
2109 dump_generic_node (buffer
, CHREC_RIGHT (node
), spc
, flags
, false);
2110 pp_string (buffer
, "}_");
2111 dump_generic_node (buffer
, CHREC_VAR (node
), spc
, flags
, false);
2115 case REALIGN_LOAD_EXPR
:
2116 pp_string (buffer
, "REALIGN_LOAD <");
2117 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
2118 pp_string (buffer
, ", ");
2119 dump_generic_node (buffer
, TREE_OPERAND (node
, 1), spc
, flags
, false);
2120 pp_string (buffer
, ", ");
2121 dump_generic_node (buffer
, TREE_OPERAND (node
, 2), spc
, flags
, false);
2122 pp_greater (buffer
);
2126 pp_string (buffer
, " VEC_COND_EXPR < ");
2127 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
2128 pp_string (buffer
, " , ");
2129 dump_generic_node (buffer
, TREE_OPERAND (node
, 1), spc
, flags
, false);
2130 pp_string (buffer
, " , ");
2131 dump_generic_node (buffer
, TREE_OPERAND (node
, 2), spc
, flags
, false);
2132 pp_string (buffer
, " > ");
2136 pp_string (buffer
, " VEC_PERM_EXPR < ");
2137 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
2138 pp_string (buffer
, " , ");
2139 dump_generic_node (buffer
, TREE_OPERAND (node
, 1), spc
, flags
, false);
2140 pp_string (buffer
, " , ");
2141 dump_generic_node (buffer
, TREE_OPERAND (node
, 2), spc
, flags
, false);
2142 pp_string (buffer
, " > ");
2146 pp_string (buffer
, " DOT_PROD_EXPR < ");
2147 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
2148 pp_string (buffer
, ", ");
2149 dump_generic_node (buffer
, TREE_OPERAND (node
, 1), spc
, flags
, false);
2150 pp_string (buffer
, ", ");
2151 dump_generic_node (buffer
, TREE_OPERAND (node
, 2), spc
, flags
, false);
2152 pp_string (buffer
, " > ");
2155 case WIDEN_MULT_PLUS_EXPR
:
2156 pp_string (buffer
, " WIDEN_MULT_PLUS_EXPR < ");
2157 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
2158 pp_string (buffer
, ", ");
2159 dump_generic_node (buffer
, TREE_OPERAND (node
, 1), spc
, flags
, false);
2160 pp_string (buffer
, ", ");
2161 dump_generic_node (buffer
, TREE_OPERAND (node
, 2), spc
, flags
, false);
2162 pp_string (buffer
, " > ");
2165 case WIDEN_MULT_MINUS_EXPR
:
2166 pp_string (buffer
, " WIDEN_MULT_MINUS_EXPR < ");
2167 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
2168 pp_string (buffer
, ", ");
2169 dump_generic_node (buffer
, TREE_OPERAND (node
, 1), spc
, flags
, false);
2170 pp_string (buffer
, ", ");
2171 dump_generic_node (buffer
, TREE_OPERAND (node
, 2), spc
, flags
, false);
2172 pp_string (buffer
, " > ");
2176 pp_string (buffer
, " FMA_EXPR < ");
2177 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
2178 pp_string (buffer
, ", ");
2179 dump_generic_node (buffer
, TREE_OPERAND (node
, 1), spc
, flags
, false);
2180 pp_string (buffer
, ", ");
2181 dump_generic_node (buffer
, TREE_OPERAND (node
, 2), spc
, flags
, false);
2182 pp_string (buffer
, " > ");
2186 pp_string (buffer
, "#pragma omp parallel");
2187 dump_omp_clauses (buffer
, OMP_PARALLEL_CLAUSES (node
), spc
, flags
);
2190 if (!(flags
& TDF_SLIM
) && OMP_BODY (node
))
2192 newline_and_indent (buffer
, spc
+ 2);
2193 pp_left_brace (buffer
);
2194 newline_and_indent (buffer
, spc
+ 4);
2195 dump_generic_node (buffer
, OMP_BODY (node
), spc
+ 4, flags
, false);
2196 newline_and_indent (buffer
, spc
+ 2);
2197 pp_right_brace (buffer
);
2203 pp_string (buffer
, "#pragma omp task");
2204 dump_omp_clauses (buffer
, OMP_TASK_CLAUSES (node
), spc
, flags
);
2208 pp_string (buffer
, "#pragma omp for");
2212 pp_string (buffer
, "#pragma omp simd");
2216 dump_omp_clauses (buffer
, OMP_FOR_CLAUSES (node
), spc
, flags
);
2218 if (!(flags
& TDF_SLIM
))
2222 if (OMP_FOR_PRE_BODY (node
))
2224 newline_and_indent (buffer
, spc
+ 2);
2225 pp_left_brace (buffer
);
2227 newline_and_indent (buffer
, spc
);
2228 dump_generic_node (buffer
, OMP_FOR_PRE_BODY (node
),
2232 for (i
= 0; i
< TREE_VEC_LENGTH (OMP_FOR_INIT (node
)); i
++)
2235 newline_and_indent (buffer
, spc
);
2236 pp_string (buffer
, "for (");
2237 dump_generic_node (buffer
, TREE_VEC_ELT (OMP_FOR_INIT (node
), i
),
2239 pp_string (buffer
, "; ");
2240 dump_generic_node (buffer
, TREE_VEC_ELT (OMP_FOR_COND (node
), i
),
2242 pp_string (buffer
, "; ");
2243 dump_generic_node (buffer
, TREE_VEC_ELT (OMP_FOR_INCR (node
), i
),
2245 pp_right_paren (buffer
);
2247 if (OMP_FOR_BODY (node
))
2249 newline_and_indent (buffer
, spc
+ 2);
2250 pp_left_brace (buffer
);
2251 newline_and_indent (buffer
, spc
+ 4);
2252 dump_generic_node (buffer
, OMP_FOR_BODY (node
), spc
+ 4, flags
,
2254 newline_and_indent (buffer
, spc
+ 2);
2255 pp_right_brace (buffer
);
2257 spc
-= 2 * TREE_VEC_LENGTH (OMP_FOR_INIT (node
)) - 2;
2258 if (OMP_FOR_PRE_BODY (node
))
2261 newline_and_indent (buffer
, spc
+ 2);
2262 pp_right_brace (buffer
);
2269 pp_string (buffer
, "#pragma omp sections");
2270 dump_omp_clauses (buffer
, OMP_SECTIONS_CLAUSES (node
), spc
, flags
);
2274 pp_string (buffer
, "#pragma omp section");
2278 pp_string (buffer
, "#pragma omp master");
2282 pp_string (buffer
, "#pragma omp ordered");
2286 pp_string (buffer
, "#pragma omp critical");
2287 if (OMP_CRITICAL_NAME (node
))
2290 pp_left_paren (buffer
);
2291 dump_generic_node (buffer
, OMP_CRITICAL_NAME (node
), spc
,
2293 pp_right_paren (buffer
);
2298 pp_string (buffer
, "#pragma omp atomic");
2299 newline_and_indent (buffer
, spc
+ 2);
2300 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
2304 dump_generic_node (buffer
, TREE_OPERAND (node
, 1), spc
, flags
, false);
2307 case OMP_ATOMIC_READ
:
2308 pp_string (buffer
, "#pragma omp atomic read");
2309 newline_and_indent (buffer
, spc
+ 2);
2310 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
2314 case OMP_ATOMIC_CAPTURE_OLD
:
2315 case OMP_ATOMIC_CAPTURE_NEW
:
2316 pp_string (buffer
, "#pragma omp atomic capture");
2317 newline_and_indent (buffer
, spc
+ 2);
2318 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
2322 dump_generic_node (buffer
, TREE_OPERAND (node
, 1), spc
, flags
, false);
2326 pp_string (buffer
, "#pragma omp single");
2327 dump_omp_clauses (buffer
, OMP_SINGLE_CLAUSES (node
), spc
, flags
);
2331 dump_omp_clause (buffer
, node
, spc
, flags
);
2335 case TRANSACTION_EXPR
:
2336 if (TRANSACTION_EXPR_OUTER (node
))
2337 pp_string (buffer
, "__transaction_atomic [[outer]]");
2338 else if (TRANSACTION_EXPR_RELAXED (node
))
2339 pp_string (buffer
, "__transaction_relaxed");
2341 pp_string (buffer
, "__transaction_atomic");
2342 if (!(flags
& TDF_SLIM
) && TRANSACTION_EXPR_BODY (node
))
2344 newline_and_indent (buffer
, spc
);
2345 pp_left_brace (buffer
);
2346 newline_and_indent (buffer
, spc
+ 2);
2347 dump_generic_node (buffer
, TRANSACTION_EXPR_BODY (node
),
2348 spc
+ 2, flags
, false);
2349 newline_and_indent (buffer
, spc
);
2350 pp_right_brace (buffer
);
2355 case REDUC_MAX_EXPR
:
2356 pp_string (buffer
, " REDUC_MAX_EXPR < ");
2357 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
2358 pp_string (buffer
, " > ");
2361 case REDUC_MIN_EXPR
:
2362 pp_string (buffer
, " REDUC_MIN_EXPR < ");
2363 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
2364 pp_string (buffer
, " > ");
2367 case REDUC_PLUS_EXPR
:
2368 pp_string (buffer
, " REDUC_PLUS_EXPR < ");
2369 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
2370 pp_string (buffer
, " > ");
2373 case VEC_WIDEN_MULT_HI_EXPR
:
2374 case VEC_WIDEN_MULT_LO_EXPR
:
2375 case VEC_WIDEN_MULT_EVEN_EXPR
:
2376 case VEC_WIDEN_MULT_ODD_EXPR
:
2377 case VEC_WIDEN_LSHIFT_HI_EXPR
:
2378 case VEC_WIDEN_LSHIFT_LO_EXPR
:
2380 for (str
= tree_code_name
[code
]; *str
; str
++)
2381 pp_character (buffer
, TOUPPER (*str
));
2382 pp_string (buffer
, " < ");
2383 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
2384 pp_string (buffer
, ", ");
2385 dump_generic_node (buffer
, TREE_OPERAND (node
, 1), spc
, flags
, false);
2386 pp_string (buffer
, " > ");
2389 case VEC_UNPACK_HI_EXPR
:
2390 pp_string (buffer
, " VEC_UNPACK_HI_EXPR < ");
2391 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
2392 pp_string (buffer
, " > ");
2395 case VEC_UNPACK_LO_EXPR
:
2396 pp_string (buffer
, " VEC_UNPACK_LO_EXPR < ");
2397 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
2398 pp_string (buffer
, " > ");
2401 case VEC_UNPACK_FLOAT_HI_EXPR
:
2402 pp_string (buffer
, " VEC_UNPACK_FLOAT_HI_EXPR < ");
2403 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
2404 pp_string (buffer
, " > ");
2407 case VEC_UNPACK_FLOAT_LO_EXPR
:
2408 pp_string (buffer
, " VEC_UNPACK_FLOAT_LO_EXPR < ");
2409 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
2410 pp_string (buffer
, " > ");
2413 case VEC_PACK_TRUNC_EXPR
:
2414 pp_string (buffer
, " VEC_PACK_TRUNC_EXPR < ");
2415 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
2416 pp_string (buffer
, ", ");
2417 dump_generic_node (buffer
, TREE_OPERAND (node
, 1), spc
, flags
, false);
2418 pp_string (buffer
, " > ");
2421 case VEC_PACK_SAT_EXPR
:
2422 pp_string (buffer
, " VEC_PACK_SAT_EXPR < ");
2423 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
2424 pp_string (buffer
, ", ");
2425 dump_generic_node (buffer
, TREE_OPERAND (node
, 1), spc
, flags
, false);
2426 pp_string (buffer
, " > ");
2429 case VEC_PACK_FIX_TRUNC_EXPR
:
2430 pp_string (buffer
, " VEC_PACK_FIX_TRUNC_EXPR < ");
2431 dump_generic_node (buffer
, TREE_OPERAND (node
, 0), spc
, flags
, false);
2432 pp_string (buffer
, ", ");
2433 dump_generic_node (buffer
, TREE_OPERAND (node
, 1), spc
, flags
, false);
2434 pp_string (buffer
, " > ");
2438 dump_block_node (buffer
, node
, spc
, flags
);
2445 if (is_stmt
&& is_expr
)
2446 pp_semicolon (buffer
);
2451 /* Print the declaration of a variable. */
2454 print_declaration (pretty_printer
*buffer
, tree t
, int spc
, int flags
)
2458 if (TREE_CODE (t
) == TYPE_DECL
)
2459 pp_string (buffer
, "typedef ");
2461 if (CODE_CONTAINS_STRUCT (TREE_CODE (t
), TS_DECL_WRTL
) && DECL_REGISTER (t
))
2462 pp_string (buffer
, "register ");
2464 if (TREE_PUBLIC (t
) && DECL_EXTERNAL (t
))
2465 pp_string (buffer
, "extern ");
2466 else if (TREE_STATIC (t
))
2467 pp_string (buffer
, "static ");
2469 /* Print the type and name. */
2470 if (TREE_TYPE (t
) && TREE_CODE (TREE_TYPE (t
)) == ARRAY_TYPE
)
2474 /* Print array's type. */
2475 tmp
= TREE_TYPE (t
);
2476 while (TREE_CODE (TREE_TYPE (tmp
)) == ARRAY_TYPE
)
2477 tmp
= TREE_TYPE (tmp
);
2478 dump_generic_node (buffer
, TREE_TYPE (tmp
), spc
, flags
, false);
2480 /* Print variable's name. */
2482 dump_generic_node (buffer
, t
, spc
, flags
, false);
2484 /* Print the dimensions. */
2485 tmp
= TREE_TYPE (t
);
2486 while (TREE_CODE (tmp
) == ARRAY_TYPE
)
2488 dump_array_domain (buffer
, TYPE_DOMAIN (tmp
), spc
, flags
);
2489 tmp
= TREE_TYPE (tmp
);
2492 else if (TREE_CODE (t
) == FUNCTION_DECL
)
2494 dump_generic_node (buffer
, TREE_TYPE (TREE_TYPE (t
)), spc
, flags
, false);
2496 dump_decl_name (buffer
, t
, flags
);
2497 dump_function_declaration (buffer
, TREE_TYPE (t
), spc
, flags
);
2501 /* Print type declaration. */
2502 dump_generic_node (buffer
, TREE_TYPE (t
), spc
, flags
, false);
2504 /* Print variable's name. */
2506 dump_generic_node (buffer
, t
, spc
, flags
, false);
2509 if (TREE_CODE (t
) == VAR_DECL
&& DECL_HARD_REGISTER (t
))
2511 pp_string (buffer
, " __asm__ ");
2512 pp_left_paren (buffer
);
2513 dump_generic_node (buffer
, DECL_ASSEMBLER_NAME (t
), spc
, flags
, false);
2514 pp_right_paren (buffer
);
2517 /* The initial value of a function serves to determine whether the function
2518 is declared or defined. So the following does not apply to function
2520 if (TREE_CODE (t
) != FUNCTION_DECL
)
2522 /* Print the initial value. */
2523 if (DECL_INITIAL (t
))
2528 dump_generic_node (buffer
, DECL_INITIAL (t
), spc
, flags
, false);
2532 if (TREE_CODE (t
) == VAR_DECL
&& DECL_HAS_VALUE_EXPR_P (t
))
2534 pp_string (buffer
, " [value-expr: ");
2535 dump_generic_node (buffer
, DECL_VALUE_EXPR (t
), spc
, flags
, false);
2536 pp_right_bracket (buffer
);
2539 pp_semicolon (buffer
);
2543 /* Prints a structure: name, fields, and methods.
2544 FIXME: Still incomplete. */
2547 print_struct_decl (pretty_printer
*buffer
, const_tree node
, int spc
, int flags
)
2549 /* Print the name of the structure. */
2550 if (TYPE_NAME (node
))
2553 if (TREE_CODE (node
) == RECORD_TYPE
)
2554 pp_string (buffer
, "struct ");
2555 else if ((TREE_CODE (node
) == UNION_TYPE
2556 || TREE_CODE (node
) == QUAL_UNION_TYPE
))
2557 pp_string (buffer
, "union ");
2559 dump_generic_node (buffer
, TYPE_NAME (node
), spc
, 0, false);
2562 /* Print the contents of the structure. */
2563 pp_newline (buffer
);
2565 pp_left_brace (buffer
);
2566 pp_newline (buffer
);
2568 /* Print the fields of the structure. */
2571 tmp
= TYPE_FIELDS (node
);
2574 /* Avoid to print recursively the structure. */
2575 /* FIXME : Not implemented correctly...,
2576 what about the case when we have a cycle in the contain graph? ...
2577 Maybe this could be solved by looking at the scope in which the
2578 structure was declared. */
2579 if (TREE_TYPE (tmp
) != node
2580 && (TREE_CODE (TREE_TYPE (tmp
)) != POINTER_TYPE
2581 || TREE_TYPE (TREE_TYPE (tmp
)) != node
))
2583 print_declaration (buffer
, tmp
, spc
+2, flags
);
2584 pp_newline (buffer
);
2586 tmp
= DECL_CHAIN (tmp
);
2590 pp_right_brace (buffer
);
2593 /* Return the priority of the operator CODE.
2595 From lowest to highest precedence with either left-to-right (L-R)
2596 or right-to-left (R-L) associativity]:
2599 2 [R-L] = += -= *= /= %= &= ^= |= <<= >>=
2611 14 [R-L] ! ~ ++ -- + - * & (type) sizeof
2612 15 [L-R] fn() [] -> .
2614 unary +, - and * have higher precedence than the corresponding binary
2618 op_code_prio (enum tree_code code
)
2635 case TRUTH_ORIF_EXPR
:
2638 case TRUTH_AND_EXPR
:
2639 case TRUTH_ANDIF_EXPR
:
2646 case TRUTH_XOR_EXPR
:
2663 case UNORDERED_EXPR
:
2674 case VEC_WIDEN_LSHIFT_HI_EXPR
:
2675 case VEC_WIDEN_LSHIFT_LO_EXPR
:
2676 case WIDEN_LSHIFT_EXPR
:
2679 case WIDEN_SUM_EXPR
:
2681 case POINTER_PLUS_EXPR
:
2685 case VEC_WIDEN_MULT_HI_EXPR
:
2686 case VEC_WIDEN_MULT_LO_EXPR
:
2687 case WIDEN_MULT_EXPR
:
2689 case WIDEN_MULT_PLUS_EXPR
:
2690 case WIDEN_MULT_MINUS_EXPR
:
2692 case MULT_HIGHPART_EXPR
:
2693 case TRUNC_DIV_EXPR
:
2695 case FLOOR_DIV_EXPR
:
2696 case ROUND_DIV_EXPR
:
2698 case EXACT_DIV_EXPR
:
2699 case TRUNC_MOD_EXPR
:
2701 case FLOOR_MOD_EXPR
:
2702 case ROUND_MOD_EXPR
:
2706 case TRUTH_NOT_EXPR
:
2708 case POSTINCREMENT_EXPR
:
2709 case POSTDECREMENT_EXPR
:
2710 case PREINCREMENT_EXPR
:
2711 case PREDECREMENT_EXPR
:
2717 case FIX_TRUNC_EXPR
:
2723 case ARRAY_RANGE_REF
:
2727 /* Special expressions. */
2733 case REDUC_MAX_EXPR
:
2734 case REDUC_MIN_EXPR
:
2735 case REDUC_PLUS_EXPR
:
2736 case VEC_LSHIFT_EXPR
:
2737 case VEC_RSHIFT_EXPR
:
2738 case VEC_UNPACK_HI_EXPR
:
2739 case VEC_UNPACK_LO_EXPR
:
2740 case VEC_UNPACK_FLOAT_HI_EXPR
:
2741 case VEC_UNPACK_FLOAT_LO_EXPR
:
2742 case VEC_PACK_TRUNC_EXPR
:
2743 case VEC_PACK_SAT_EXPR
:
2747 /* Return an arbitrarily high precedence to avoid surrounding single
2748 VAR_DECLs in ()s. */
2753 /* Return the priority of the operator OP. */
2756 op_prio (const_tree op
)
2758 enum tree_code code
;
2763 code
= TREE_CODE (op
);
2764 if (code
== SAVE_EXPR
|| code
== NON_LVALUE_EXPR
)
2765 return op_prio (TREE_OPERAND (op
, 0));
2767 return op_code_prio (code
);
2770 /* Return the symbol associated with operator CODE. */
2773 op_symbol_code (enum tree_code code
)
2781 case TRUTH_ORIF_EXPR
:
2784 case TRUTH_AND_EXPR
:
2785 case TRUTH_ANDIF_EXPR
:
2791 case TRUTH_XOR_EXPR
:
2801 case UNORDERED_EXPR
:
2847 case VEC_LSHIFT_EXPR
:
2850 case VEC_RSHIFT_EXPR
:
2853 case WIDEN_LSHIFT_EXPR
:
2856 case POINTER_PLUS_EXPR
:
2862 case REDUC_PLUS_EXPR
:
2865 case WIDEN_SUM_EXPR
:
2868 case WIDEN_MULT_EXPR
:
2871 case MULT_HIGHPART_EXPR
:
2881 case TRUTH_NOT_EXPR
:
2888 case TRUNC_DIV_EXPR
:
2895 case FLOOR_DIV_EXPR
:
2898 case ROUND_DIV_EXPR
:
2901 case EXACT_DIV_EXPR
:
2904 case TRUNC_MOD_EXPR
:
2910 case FLOOR_MOD_EXPR
:
2913 case ROUND_MOD_EXPR
:
2916 case PREDECREMENT_EXPR
:
2919 case PREINCREMENT_EXPR
:
2922 case POSTDECREMENT_EXPR
:
2925 case POSTINCREMENT_EXPR
:
2935 return "<<< ??? >>>";
2939 /* Return the symbol associated with operator OP. */
2942 op_symbol (const_tree op
)
2944 return op_symbol_code (TREE_CODE (op
));
2947 /* Prints the name of a call. NODE is the CALL_EXPR_FN of a CALL_EXPR or
2948 the gimple_call_fn of a GIMPLE_CALL. */
2951 print_call_name (pretty_printer
*buffer
, tree node
, int flags
)
2955 if (TREE_CODE (op0
) == NON_LVALUE_EXPR
)
2956 op0
= TREE_OPERAND (op0
, 0);
2959 switch (TREE_CODE (op0
))
2964 dump_function_name (buffer
, op0
, flags
);
2970 op0
= TREE_OPERAND (op0
, 0);
2974 pp_left_paren (buffer
);
2975 dump_generic_node (buffer
, TREE_OPERAND (op0
, 0), 0, flags
, false);
2976 pp_string (buffer
, ") ? ");
2977 dump_generic_node (buffer
, TREE_OPERAND (op0
, 1), 0, flags
, false);
2978 pp_string (buffer
, " : ");
2979 dump_generic_node (buffer
, TREE_OPERAND (op0
, 2), 0, flags
, false);
2983 if (TREE_CODE (TREE_OPERAND (op0
, 0)) == VAR_DECL
)
2984 dump_function_name (buffer
, TREE_OPERAND (op0
, 0), flags
);
2986 dump_generic_node (buffer
, op0
, 0, flags
, false);
2990 if (integer_zerop (TREE_OPERAND (op0
, 1)))
2992 op0
= TREE_OPERAND (op0
, 0);
2999 dump_generic_node (buffer
, op0
, 0, flags
, false);
3007 /* Parses the string STR and replaces new-lines by '\n', tabs by '\t', ... */
3010 pretty_print_string (pretty_printer
*buffer
, const char *str
)
3020 pp_string (buffer
, "\\b");
3024 pp_string (buffer
, "\\f");
3028 pp_string (buffer
, "\\n");
3032 pp_string (buffer
, "\\r");
3036 pp_string (buffer
, "\\t");
3040 pp_string (buffer
, "\\v");
3044 pp_string (buffer
, "\\\\");
3048 pp_string (buffer
, "\\\"");
3052 pp_string (buffer
, "\\'");
3055 /* No need to handle \0; the loop terminates on \0. */
3058 pp_string (buffer
, "\\1");
3062 pp_string (buffer
, "\\2");
3066 pp_string (buffer
, "\\3");
3070 pp_string (buffer
, "\\4");
3074 pp_string (buffer
, "\\5");
3078 pp_string (buffer
, "\\6");
3082 pp_string (buffer
, "\\7");
3086 pp_character (buffer
, str
[0]);
3094 maybe_init_pretty_print (FILE *file
)
3098 new (&buffer
) pretty_printer ();
3099 pp_needs_newline (&buffer
) = true;
3100 pp_translate_identifiers (&buffer
) = false;
3104 buffer
.buffer
->stream
= file
;
3108 newline_and_indent (pretty_printer
*buffer
, int spc
)
3110 pp_newline (buffer
);
3114 /* Handle a %K format for TEXT. Separate from default_tree_printer so
3115 it can also be used in front ends.
3116 %K: a statement, from which EXPR_LOCATION and TREE_BLOCK will be recorded.
3120 percent_K_format (text_info
*text
)
3122 tree t
= va_arg (*text
->args_ptr
, tree
), block
;
3123 gcc_assert (text
->locus
!= NULL
);
3124 *text
->locus
= EXPR_LOCATION (t
);
3125 gcc_assert (pp_ti_abstract_origin (text
) != NULL
);
3126 block
= TREE_BLOCK (t
);
3127 *pp_ti_abstract_origin (text
) = NULL
;
3129 && TREE_CODE (block
) == BLOCK
3130 && BLOCK_ABSTRACT_ORIGIN (block
))
3132 tree ao
= BLOCK_ABSTRACT_ORIGIN (block
);
3134 while (TREE_CODE (ao
) == BLOCK
3135 && BLOCK_ABSTRACT_ORIGIN (ao
)
3136 && BLOCK_ABSTRACT_ORIGIN (ao
) != ao
)
3137 ao
= BLOCK_ABSTRACT_ORIGIN (ao
);
3139 if (TREE_CODE (ao
) == FUNCTION_DECL
)
3141 *pp_ti_abstract_origin (text
) = block
;
3144 block
= BLOCK_SUPERCONTEXT (block
);
3148 /* Print the identifier ID to PRETTY-PRINTER. */
3151 pp_tree_identifier (pretty_printer
*pp
, tree id
)
3153 if (pp_translate_identifiers (pp
))
3155 const char *text
= identifier_to_locale (IDENTIFIER_POINTER (id
));
3156 pp_append_text (pp
, text
, text
+ strlen (text
));
3159 pp_append_text (pp
, IDENTIFIER_POINTER (id
),
3160 IDENTIFIER_POINTER (id
) + IDENTIFIER_LENGTH (id
));
3163 /* A helper function that is used to dump function information before the
3167 dump_function_header (FILE *dump_file
, tree fdecl
, int flags
)
3169 const char *dname
, *aname
;
3170 struct cgraph_node
*node
= cgraph_get_node (fdecl
);
3171 struct function
*fun
= DECL_STRUCT_FUNCTION (fdecl
);
3173 dname
= lang_hooks
.decl_printable_name (fdecl
, 2);
3175 if (DECL_ASSEMBLER_NAME_SET_P (fdecl
))
3176 aname
= (IDENTIFIER_POINTER
3177 (DECL_ASSEMBLER_NAME (fdecl
)));
3179 aname
= "<unset-asm-name>";
3181 fprintf (dump_file
, "\n;; Function %s (%s, funcdef_no=%d",
3182 dname
, aname
, fun
->funcdef_no
);
3183 if (!(flags
& TDF_NOUID
))
3184 fprintf (dump_file
, ", decl_uid=%d", DECL_UID (fdecl
));
3187 fprintf (dump_file
, ", symbol_order=%d)%s\n\n", node
->symbol
.order
,
3188 node
->frequency
== NODE_FREQUENCY_HOT
3190 : node
->frequency
== NODE_FREQUENCY_UNLIKELY_EXECUTED
3191 ? " (unlikely executed)"
3192 : node
->frequency
== NODE_FREQUENCY_EXECUTED_ONCE
3193 ? " (executed once)"
3197 fprintf (dump_file
, ")\n\n");