cgraphunit.c (handle_alias_pairs): Also handle wekref with destination declared.
[official-gcc.git] / gcc / gimple-pretty-print.c
blob981d5b094d9dbd714ad6cc8a545329570571c3c6
1 /* Pretty formatting of GIMPLE statements and expressions.
2 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
3 2011 Free Software Foundation, Inc.
4 Contributed by Aldy Hernandez <aldyh@redhat.com> and
5 Diego Novillo <dnovillo@google.com>
7 This file is part of GCC.
9 GCC is free software; you can redistribute it and/or modify it under
10 the terms of the GNU General Public License as published by the Free
11 Software Foundation; either version 3, or (at your option) any later
12 version.
14 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 for more details.
19 You should have received a copy of the GNU General Public License
20 along with GCC; see the file COPYING3. If not see
21 <http://www.gnu.org/licenses/>. */
23 #include "config.h"
24 #include "system.h"
25 #include "coretypes.h"
26 #include "tm.h"
27 #include "tree.h"
28 #include "diagnostic.h"
29 #include "tree-pretty-print.h"
30 #include "gimple-pretty-print.h"
31 #include "hashtab.h"
32 #include "tree-flow.h"
33 #include "tree-pass.h"
34 #include "gimple.h"
35 #include "value-prof.h"
37 #define INDENT(SPACE) \
38 do { int i; for (i = 0; i < SPACE; i++) pp_space (buffer); } while (0)
40 static pretty_printer buffer;
41 static bool initialized = false;
43 #define GIMPLE_NIY do_niy (buffer,gs)
45 /* Try to print on BUFFER a default message for the unrecognized
46 gimple statement GS. */
48 static void
49 do_niy (pretty_printer *buffer, gimple gs)
51 pp_printf (buffer, "<<< Unknown GIMPLE statement: %s >>>\n",
52 gimple_code_name[(int) gimple_code (gs)]);
56 /* Initialize the pretty printer on FILE if needed. */
58 static void
59 maybe_init_pretty_print (FILE *file)
61 if (!initialized)
63 pp_construct (&buffer, NULL, 0);
64 pp_needs_newline (&buffer) = true;
65 initialized = true;
68 buffer.buffer->stream = file;
72 /* Emit a newline and SPC indentantion spaces to BUFFER. */
74 static void
75 newline_and_indent (pretty_printer *buffer, int spc)
77 pp_newline (buffer);
78 INDENT (spc);
82 /* Print the GIMPLE statement GS on stderr. */
84 DEBUG_FUNCTION void
85 debug_gimple_stmt (gimple gs)
87 print_gimple_stmt (stderr, gs, 0, TDF_VOPS|TDF_MEMSYMS);
88 fprintf (stderr, "\n");
92 /* Dump GIMPLE statement G to FILE using SPC indentantion spaces and
93 FLAGS as in dump_gimple_stmt. */
95 void
96 print_gimple_stmt (FILE *file, gimple g, int spc, int flags)
98 maybe_init_pretty_print (file);
99 dump_gimple_stmt (&buffer, g, spc, flags);
100 pp_flush (&buffer);
104 /* Dump GIMPLE statement G to FILE using SPC indentantion spaces and
105 FLAGS as in dump_gimple_stmt. Print only the right-hand side
106 of the statement. */
108 void
109 print_gimple_expr (FILE *file, gimple g, int spc, int flags)
111 flags |= TDF_RHS_ONLY;
112 maybe_init_pretty_print (file);
113 dump_gimple_stmt (&buffer, g, spc, flags);
117 /* Print the GIMPLE sequence SEQ on BUFFER using SPC indentantion
118 spaces and FLAGS as in dump_gimple_stmt. */
120 static void
121 dump_gimple_seq (pretty_printer *buffer, gimple_seq seq, int spc, int flags)
123 gimple_stmt_iterator i;
125 for (i = gsi_start (seq); !gsi_end_p (i); gsi_next (&i))
127 gimple gs = gsi_stmt (i);
128 INDENT (spc);
129 dump_gimple_stmt (buffer, gs, spc, flags);
130 if (!gsi_one_before_end_p (i))
131 pp_newline (buffer);
136 /* Dump GIMPLE sequence SEQ to FILE using SPC indentantion spaces and
137 FLAGS as in dump_gimple_stmt. */
139 void
140 print_gimple_seq (FILE *file, gimple_seq seq, int spc, int flags)
142 maybe_init_pretty_print (file);
143 dump_gimple_seq (&buffer, seq, spc, flags);
144 pp_flush (&buffer);
148 /* Print the GIMPLE sequence SEQ on stderr. */
150 DEBUG_FUNCTION void
151 debug_gimple_seq (gimple_seq seq)
153 print_gimple_seq (stderr, seq, 0, TDF_VOPS|TDF_MEMSYMS);
157 /* A simple helper to pretty-print some of the gimple tuples in the printf
158 style. The format modifiers are preceeded by '%' and are:
159 'G' - outputs a string corresponding to the code of the given gimple,
160 'S' - outputs a gimple_seq with indent of spc + 2,
161 'T' - outputs the tree t,
162 'd' - outputs an int as a decimal,
163 's' - outputs a string,
164 'n' - outputs a newline,
165 '+' - increases indent by 2 then outputs a newline,
166 '-' - decreases indent by 2 then outputs a newline. */
168 static void
169 dump_gimple_fmt (pretty_printer *buffer, int spc, int flags,
170 const char *fmt, ...)
172 va_list args;
173 const char *c;
174 const char *tmp;
176 va_start (args, fmt);
177 for (c = fmt; *c; c++)
179 if (*c == '%')
181 gimple_seq seq;
182 tree t;
183 gimple g;
184 switch (*++c)
186 case 'G':
187 g = va_arg (args, gimple);
188 tmp = gimple_code_name[gimple_code (g)];
189 pp_string (buffer, tmp);
190 break;
192 case 'S':
193 seq = va_arg (args, gimple_seq);
194 pp_newline (buffer);
195 dump_gimple_seq (buffer, seq, spc + 2, flags);
196 newline_and_indent (buffer, spc);
197 break;
199 case 'T':
200 t = va_arg (args, tree);
201 if (t == NULL_TREE)
202 pp_string (buffer, "NULL");
203 else
204 dump_generic_node (buffer, t, spc, flags, false);
205 break;
207 case 'd':
208 pp_decimal_int (buffer, va_arg (args, int));
209 break;
211 case 's':
212 pp_string (buffer, va_arg (args, char *));
213 break;
215 case 'n':
216 newline_and_indent (buffer, spc);
217 break;
219 case '+':
220 spc += 2;
221 newline_and_indent (buffer, spc);
222 break;
224 case '-':
225 spc -= 2;
226 newline_and_indent (buffer, spc);
227 break;
229 default:
230 gcc_unreachable ();
233 else
234 pp_character (buffer, *c);
236 va_end (args);
240 /* Helper for dump_gimple_assign. Print the unary RHS of the
241 assignment GS. BUFFER, SPC and FLAGS are as in dump_gimple_stmt. */
243 static void
244 dump_unary_rhs (pretty_printer *buffer, gimple gs, int spc, int flags)
246 enum tree_code rhs_code = gimple_assign_rhs_code (gs);
247 tree lhs = gimple_assign_lhs (gs);
248 tree rhs = gimple_assign_rhs1 (gs);
250 switch (rhs_code)
252 case VIEW_CONVERT_EXPR:
253 case ASSERT_EXPR:
254 dump_generic_node (buffer, rhs, spc, flags, false);
255 break;
257 case FIXED_CONVERT_EXPR:
258 case ADDR_SPACE_CONVERT_EXPR:
259 case FIX_TRUNC_EXPR:
260 case FLOAT_EXPR:
261 CASE_CONVERT:
262 pp_character (buffer, '(');
263 dump_generic_node (buffer, TREE_TYPE (lhs), spc, flags, false);
264 pp_string (buffer, ") ");
265 if (op_prio (rhs) < op_code_prio (rhs_code))
267 pp_character (buffer, '(');
268 dump_generic_node (buffer, rhs, spc, flags, false);
269 pp_character (buffer, ')');
271 else
272 dump_generic_node (buffer, rhs, spc, flags, false);
273 break;
275 case PAREN_EXPR:
276 pp_string (buffer, "((");
277 dump_generic_node (buffer, rhs, spc, flags, false);
278 pp_string (buffer, "))");
279 break;
281 case ABS_EXPR:
282 pp_string (buffer, "ABS_EXPR <");
283 dump_generic_node (buffer, rhs, spc, flags, false);
284 pp_character (buffer, '>');
285 break;
287 default:
288 if (TREE_CODE_CLASS (rhs_code) == tcc_declaration
289 || TREE_CODE_CLASS (rhs_code) == tcc_constant
290 || TREE_CODE_CLASS (rhs_code) == tcc_reference
291 || rhs_code == SSA_NAME
292 || rhs_code == ADDR_EXPR
293 || rhs_code == CONSTRUCTOR)
295 dump_generic_node (buffer, rhs, spc, flags, false);
296 break;
298 else if (rhs_code == BIT_NOT_EXPR)
299 pp_character (buffer, '~');
300 else if (rhs_code == TRUTH_NOT_EXPR)
301 pp_character (buffer, '!');
302 else if (rhs_code == NEGATE_EXPR)
303 pp_character (buffer, '-');
304 else
306 pp_character (buffer, '[');
307 pp_string (buffer, tree_code_name [rhs_code]);
308 pp_string (buffer, "] ");
311 if (op_prio (rhs) < op_code_prio (rhs_code))
313 pp_character (buffer, '(');
314 dump_generic_node (buffer, rhs, spc, flags, false);
315 pp_character (buffer, ')');
317 else
318 dump_generic_node (buffer, rhs, spc, flags, false);
319 break;
324 /* Helper for dump_gimple_assign. Print the binary RHS of the
325 assignment GS. BUFFER, SPC and FLAGS are as in dump_gimple_stmt. */
327 static void
328 dump_binary_rhs (pretty_printer *buffer, gimple gs, int spc, int flags)
330 const char *p;
331 enum tree_code code = gimple_assign_rhs_code (gs);
332 switch (code)
334 case COMPLEX_EXPR:
335 case MIN_EXPR:
336 case MAX_EXPR:
337 case VEC_WIDEN_MULT_HI_EXPR:
338 case VEC_WIDEN_MULT_LO_EXPR:
339 case VEC_PACK_TRUNC_EXPR:
340 case VEC_PACK_SAT_EXPR:
341 case VEC_PACK_FIX_TRUNC_EXPR:
342 case VEC_EXTRACT_EVEN_EXPR:
343 case VEC_EXTRACT_ODD_EXPR:
344 case VEC_INTERLEAVE_HIGH_EXPR:
345 case VEC_INTERLEAVE_LOW_EXPR:
346 case VEC_WIDEN_LSHIFT_HI_EXPR:
347 case VEC_WIDEN_LSHIFT_LO_EXPR:
348 for (p = tree_code_name [(int) code]; *p; p++)
349 pp_character (buffer, TOUPPER (*p));
350 pp_string (buffer, " <");
351 dump_generic_node (buffer, gimple_assign_rhs1 (gs), spc, flags, false);
352 pp_string (buffer, ", ");
353 dump_generic_node (buffer, gimple_assign_rhs2 (gs), spc, flags, false);
354 pp_character (buffer, '>');
355 break;
357 default:
358 if (op_prio (gimple_assign_rhs1 (gs)) <= op_code_prio (code))
360 pp_character (buffer, '(');
361 dump_generic_node (buffer, gimple_assign_rhs1 (gs), spc, flags,
362 false);
363 pp_character (buffer, ')');
365 else
366 dump_generic_node (buffer, gimple_assign_rhs1 (gs), spc, flags, false);
367 pp_space (buffer);
368 pp_string (buffer, op_symbol_code (gimple_assign_rhs_code (gs)));
369 pp_space (buffer);
370 if (op_prio (gimple_assign_rhs2 (gs)) <= op_code_prio (code))
372 pp_character (buffer, '(');
373 dump_generic_node (buffer, gimple_assign_rhs2 (gs), spc, flags,
374 false);
375 pp_character (buffer, ')');
377 else
378 dump_generic_node (buffer, gimple_assign_rhs2 (gs), spc, flags, false);
382 /* Helper for dump_gimple_assign. Print the ternary RHS of the
383 assignment GS. BUFFER, SPC and FLAGS are as in dump_gimple_stmt. */
385 static void
386 dump_ternary_rhs (pretty_printer *buffer, gimple gs, int spc, int flags)
388 const char *p;
389 enum tree_code code = gimple_assign_rhs_code (gs);
390 switch (code)
392 case WIDEN_MULT_PLUS_EXPR:
393 case WIDEN_MULT_MINUS_EXPR:
394 for (p = tree_code_name [(int) code]; *p; p++)
395 pp_character (buffer, TOUPPER (*p));
396 pp_string (buffer, " <");
397 dump_generic_node (buffer, gimple_assign_rhs1 (gs), spc, flags, false);
398 pp_string (buffer, ", ");
399 dump_generic_node (buffer, gimple_assign_rhs2 (gs), spc, flags, false);
400 pp_string (buffer, ", ");
401 dump_generic_node (buffer, gimple_assign_rhs3 (gs), spc, flags, false);
402 pp_character (buffer, '>');
403 break;
405 case FMA_EXPR:
406 dump_generic_node (buffer, gimple_assign_rhs1 (gs), spc, flags, false);
407 pp_string (buffer, " * ");
408 dump_generic_node (buffer, gimple_assign_rhs2 (gs), spc, flags, false);
409 pp_string (buffer, " + ");
410 dump_generic_node (buffer, gimple_assign_rhs3 (gs), spc, flags, false);
411 break;
413 case DOT_PROD_EXPR:
414 pp_string (buffer, "DOT_PROD_EXPR <");
415 dump_generic_node (buffer, gimple_assign_rhs1 (gs), spc, flags, false);
416 pp_string (buffer, ", ");
417 dump_generic_node (buffer, gimple_assign_rhs2 (gs), spc, flags, false);
418 pp_string (buffer, ", ");
419 dump_generic_node (buffer, gimple_assign_rhs3 (gs), spc, flags, false);
420 pp_string (buffer, ">");
421 break;
423 case VEC_PERM_EXPR:
424 pp_string (buffer, "VEC_PERM_EXPR <");
425 dump_generic_node (buffer, gimple_assign_rhs1 (gs), spc, flags, false);
426 pp_string (buffer, ", ");
427 dump_generic_node (buffer, gimple_assign_rhs2 (gs), spc, flags, false);
428 pp_string (buffer, ", ");
429 dump_generic_node (buffer, gimple_assign_rhs3 (gs), spc, flags, false);
430 pp_string (buffer, ">");
431 break;
433 case REALIGN_LOAD_EXPR:
434 pp_string (buffer, "REALIGN_LOAD <");
435 dump_generic_node (buffer, gimple_assign_rhs1 (gs), spc, flags, false);
436 pp_string (buffer, ", ");
437 dump_generic_node (buffer, gimple_assign_rhs2 (gs), spc, flags, false);
438 pp_string (buffer, ", ");
439 dump_generic_node (buffer, gimple_assign_rhs3 (gs), spc, flags, false);
440 pp_string (buffer, ">");
441 break;
443 case COND_EXPR:
444 dump_generic_node (buffer, gimple_assign_rhs1 (gs), spc, flags, false);
445 pp_string (buffer, " ? ");
446 dump_generic_node (buffer, gimple_assign_rhs2 (gs), spc, flags, false);
447 pp_string (buffer, " : ");
448 dump_generic_node (buffer, gimple_assign_rhs3 (gs), spc, flags, false);
449 break;
451 case VEC_COND_EXPR:
452 pp_string (buffer, "VEC_COND_EXPR <");
453 dump_generic_node (buffer, gimple_assign_rhs1 (gs), spc, flags, false);
454 pp_string (buffer, ", ");
455 dump_generic_node (buffer, gimple_assign_rhs2 (gs), spc, flags, false);
456 pp_string (buffer, ", ");
457 dump_generic_node (buffer, gimple_assign_rhs3 (gs), spc, flags, false);
458 pp_string (buffer, ">");
459 break;
461 default:
462 gcc_unreachable ();
467 /* Dump the gimple assignment GS. BUFFER, SPC and FLAGS are as in
468 dump_gimple_stmt. */
470 static void
471 dump_gimple_assign (pretty_printer *buffer, gimple gs, int spc, int flags)
473 if (flags & TDF_RAW)
475 tree last;
476 if (gimple_num_ops (gs) == 2)
477 last = NULL_TREE;
478 else if (gimple_num_ops (gs) == 3)
479 last = gimple_assign_rhs2 (gs);
480 else
481 gcc_unreachable ();
483 dump_gimple_fmt (buffer, spc, flags, "%G <%s, %T, %T, %T>", gs,
484 tree_code_name[gimple_assign_rhs_code (gs)],
485 gimple_assign_lhs (gs), gimple_assign_rhs1 (gs), last);
487 else
489 if (!(flags & TDF_RHS_ONLY))
491 dump_generic_node (buffer, gimple_assign_lhs (gs), spc, flags, false);
492 pp_space (buffer);
493 pp_character (buffer, '=');
495 if (gimple_assign_nontemporal_move_p (gs))
496 pp_string (buffer, "{nt}");
498 if (gimple_has_volatile_ops (gs))
499 pp_string (buffer, "{v}");
501 pp_space (buffer);
504 if (gimple_num_ops (gs) == 2)
505 dump_unary_rhs (buffer, gs, spc, flags);
506 else if (gimple_num_ops (gs) == 3)
507 dump_binary_rhs (buffer, gs, spc, flags);
508 else if (gimple_num_ops (gs) == 4)
509 dump_ternary_rhs (buffer, gs, spc, flags);
510 else
511 gcc_unreachable ();
512 if (!(flags & TDF_RHS_ONLY))
513 pp_semicolon(buffer);
518 /* Dump the return statement GS. BUFFER, SPC and FLAGS are as in
519 dump_gimple_stmt. */
521 static void
522 dump_gimple_return (pretty_printer *buffer, gimple gs, int spc, int flags)
524 tree t;
526 t = gimple_return_retval (gs);
527 if (flags & TDF_RAW)
528 dump_gimple_fmt (buffer, spc, flags, "%G <%T>", gs, t);
529 else
531 pp_string (buffer, "return");
532 if (t)
534 pp_space (buffer);
535 dump_generic_node (buffer, t, spc, flags, false);
537 pp_semicolon (buffer);
542 /* Dump the call arguments for a gimple call. BUFFER, FLAGS are as in
543 dump_gimple_call. */
545 static void
546 dump_gimple_call_args (pretty_printer *buffer, gimple gs, int flags)
548 size_t i;
550 for (i = 0; i < gimple_call_num_args (gs); i++)
552 dump_generic_node (buffer, gimple_call_arg (gs, i), 0, flags, false);
553 if (i < gimple_call_num_args (gs) - 1)
554 pp_string (buffer, ", ");
557 if (gimple_call_va_arg_pack_p (gs))
559 if (gimple_call_num_args (gs) > 0)
561 pp_character (buffer, ',');
562 pp_space (buffer);
565 pp_string (buffer, "__builtin_va_arg_pack ()");
569 /* Dump the points-to solution *PT to BUFFER. */
571 static void
572 pp_points_to_solution (pretty_printer *buffer, struct pt_solution *pt)
574 if (pt->anything)
576 pp_string (buffer, "anything ");
577 return;
579 if (pt->nonlocal)
580 pp_string (buffer, "nonlocal ");
581 if (pt->escaped)
582 pp_string (buffer, "escaped ");
583 if (pt->ipa_escaped)
584 pp_string (buffer, "unit-escaped ");
585 if (pt->null)
586 pp_string (buffer, "null ");
587 if (pt->vars
588 && !bitmap_empty_p (pt->vars))
590 bitmap_iterator bi;
591 unsigned i;
592 pp_string (buffer, "{ ");
593 EXECUTE_IF_SET_IN_BITMAP (pt->vars, 0, i, bi)
595 tree var = referenced_var_lookup (cfun, i);
596 if (var)
598 dump_generic_node (buffer, var, 0, dump_flags, false);
599 if (DECL_PT_UID (var) != DECL_UID (var))
601 pp_string (buffer, "ptD.");
602 pp_decimal_int (buffer, DECL_PT_UID (var));
605 else
607 pp_string (buffer, "D.");
608 pp_decimal_int (buffer, i);
610 pp_character (buffer, ' ');
612 pp_character (buffer, '}');
613 if (pt->vars_contains_global)
614 pp_string (buffer, " (glob)");
618 /* Dump the call statement GS. BUFFER, SPC and FLAGS are as in
619 dump_gimple_stmt. */
621 static void
622 dump_gimple_call (pretty_printer *buffer, gimple gs, int spc, int flags)
624 tree lhs = gimple_call_lhs (gs);
626 if (flags & TDF_ALIAS)
628 struct pt_solution *pt;
629 pt = gimple_call_use_set (gs);
630 if (!pt_solution_empty_p (pt))
632 pp_string (buffer, "# USE = ");
633 pp_points_to_solution (buffer, pt);
634 newline_and_indent (buffer, spc);
636 pt = gimple_call_clobber_set (gs);
637 if (!pt_solution_empty_p (pt))
639 pp_string (buffer, "# CLB = ");
640 pp_points_to_solution (buffer, pt);
641 newline_and_indent (buffer, spc);
645 if (flags & TDF_RAW)
647 if (gimple_call_internal_p (gs))
648 dump_gimple_fmt (buffer, spc, flags, "%G <%s, %T", gs,
649 internal_fn_name (gimple_call_internal_fn (gs)), lhs);
650 else
651 dump_gimple_fmt (buffer, spc, flags, "%G <%T, %T",
652 gs, gimple_call_fn (gs), lhs);
653 if (gimple_call_num_args (gs) > 0)
655 pp_string (buffer, ", ");
656 dump_gimple_call_args (buffer, gs, flags);
658 pp_character (buffer, '>');
660 else
662 if (lhs && !(flags & TDF_RHS_ONLY))
664 dump_generic_node (buffer, lhs, spc, flags, false);
665 pp_string (buffer, " =");
667 if (gimple_has_volatile_ops (gs))
668 pp_string (buffer, "{v}");
670 pp_space (buffer);
672 if (gimple_call_internal_p (gs))
673 pp_string (buffer, internal_fn_name (gimple_call_internal_fn (gs)));
674 else
675 print_call_name (buffer, gimple_call_fn (gs), flags);
676 pp_string (buffer, " (");
677 dump_gimple_call_args (buffer, gs, flags);
678 pp_character (buffer, ')');
679 if (!(flags & TDF_RHS_ONLY))
680 pp_semicolon (buffer);
683 if (gimple_call_chain (gs))
685 pp_string (buffer, " [static-chain: ");
686 dump_generic_node (buffer, gimple_call_chain (gs), spc, flags, false);
687 pp_character (buffer, ']');
690 if (gimple_call_return_slot_opt_p (gs))
691 pp_string (buffer, " [return slot optimization]");
693 if (gimple_call_tail_p (gs))
694 pp_string (buffer, " [tail call]");
698 /* Dump the switch statement GS. BUFFER, SPC and FLAGS are as in
699 dump_gimple_stmt. */
701 static void
702 dump_gimple_switch (pretty_printer *buffer, gimple gs, int spc, int flags)
704 unsigned int i;
706 GIMPLE_CHECK (gs, GIMPLE_SWITCH);
707 if (flags & TDF_RAW)
708 dump_gimple_fmt (buffer, spc, flags, "%G <%T, ", gs,
709 gimple_switch_index (gs));
710 else
712 pp_string (buffer, "switch (");
713 dump_generic_node (buffer, gimple_switch_index (gs), spc, flags, true);
714 pp_string (buffer, ") <");
717 for (i = 0; i < gimple_switch_num_labels (gs); i++)
719 tree case_label = gimple_switch_label (gs, i);
720 if (case_label == NULL_TREE)
721 continue;
723 dump_generic_node (buffer, case_label, spc, flags, false);
724 pp_character (buffer, ' ');
725 dump_generic_node (buffer, CASE_LABEL (case_label), spc, flags, false);
726 if (i < gimple_switch_num_labels (gs) - 1)
727 pp_string (buffer, ", ");
729 pp_character (buffer, '>');
733 /* Dump the gimple conditional GS. BUFFER, SPC and FLAGS are as in
734 dump_gimple_stmt. */
736 static void
737 dump_gimple_cond (pretty_printer *buffer, gimple gs, int spc, int flags)
739 if (flags & TDF_RAW)
740 dump_gimple_fmt (buffer, spc, flags, "%G <%s, %T, %T, %T, %T>", gs,
741 tree_code_name [gimple_cond_code (gs)],
742 gimple_cond_lhs (gs), gimple_cond_rhs (gs),
743 gimple_cond_true_label (gs), gimple_cond_false_label (gs));
744 else
746 if (!(flags & TDF_RHS_ONLY))
747 pp_string (buffer, "if (");
748 dump_generic_node (buffer, gimple_cond_lhs (gs), spc, flags, false);
749 pp_space (buffer);
750 pp_string (buffer, op_symbol_code (gimple_cond_code (gs)));
751 pp_space (buffer);
752 dump_generic_node (buffer, gimple_cond_rhs (gs), spc, flags, false);
753 if (!(flags & TDF_RHS_ONLY))
755 pp_character (buffer, ')');
757 if (gimple_cond_true_label (gs))
759 pp_string (buffer, " goto ");
760 dump_generic_node (buffer, gimple_cond_true_label (gs),
761 spc, flags, false);
762 pp_semicolon (buffer);
764 if (gimple_cond_false_label (gs))
766 pp_string (buffer, " else goto ");
767 dump_generic_node (buffer, gimple_cond_false_label (gs),
768 spc, flags, false);
769 pp_semicolon (buffer);
776 /* Dump a GIMPLE_LABEL tuple on the pretty_printer BUFFER, SPC
777 spaces of indent. FLAGS specifies details to show in the dump (see
778 TDF_* in tree-pass.h). */
780 static void
781 dump_gimple_label (pretty_printer *buffer, gimple gs, int spc, int flags)
783 tree label = gimple_label_label (gs);
784 if (flags & TDF_RAW)
785 dump_gimple_fmt (buffer, spc, flags, "%G <%T>", gs, label);
786 else
788 dump_generic_node (buffer, label, spc, flags, false);
789 pp_character (buffer, ':');
791 if (DECL_NONLOCAL (label))
792 pp_string (buffer, " [non-local]");
793 if ((flags & TDF_EH) && EH_LANDING_PAD_NR (label))
794 pp_printf (buffer, " [LP %d]", EH_LANDING_PAD_NR (label));
797 /* Dump a GIMPLE_GOTO tuple on the pretty_printer BUFFER, SPC
798 spaces of indent. FLAGS specifies details to show in the dump (see
799 TDF_* in tree-pass.h). */
801 static void
802 dump_gimple_goto (pretty_printer *buffer, gimple gs, int spc, int flags)
804 tree label = gimple_goto_dest (gs);
805 if (flags & TDF_RAW)
806 dump_gimple_fmt (buffer, spc, flags, "%G <%T>", gs, label);
807 else
808 dump_gimple_fmt (buffer, spc, flags, "goto %T;", label);
812 /* Dump a GIMPLE_BIND tuple on the pretty_printer BUFFER, SPC
813 spaces of indent. FLAGS specifies details to show in the dump (see
814 TDF_* in tree-pass.h). */
816 static void
817 dump_gimple_bind (pretty_printer *buffer, gimple gs, int spc, int flags)
819 if (flags & TDF_RAW)
820 dump_gimple_fmt (buffer, spc, flags, "%G <", gs);
821 else
822 pp_character (buffer, '{');
823 if (!(flags & TDF_SLIM))
825 tree var;
827 for (var = gimple_bind_vars (gs); var; var = DECL_CHAIN (var))
829 newline_and_indent (buffer, 2);
830 print_declaration (buffer, var, spc, flags);
832 if (gimple_bind_vars (gs))
833 pp_newline (buffer);
835 pp_newline (buffer);
836 dump_gimple_seq (buffer, gimple_bind_body (gs), spc + 2, flags);
837 newline_and_indent (buffer, spc);
838 if (flags & TDF_RAW)
839 pp_character (buffer, '>');
840 else
841 pp_character (buffer, '}');
845 /* Dump a GIMPLE_TRY tuple on the pretty_printer BUFFER, SPC spaces of
846 indent. FLAGS specifies details to show in the dump (see TDF_* in
847 tree-pass.h). */
849 static void
850 dump_gimple_try (pretty_printer *buffer, gimple gs, int spc, int flags)
852 if (flags & TDF_RAW)
854 const char *type;
855 if (gimple_try_kind (gs) == GIMPLE_TRY_CATCH)
856 type = "GIMPLE_TRY_CATCH";
857 else if (gimple_try_kind (gs) == GIMPLE_TRY_FINALLY)
858 type = "GIMPLE_TRY_FINALLY";
859 else
860 type = "UNKNOWN GIMPLE_TRY";
861 dump_gimple_fmt (buffer, spc, flags,
862 "%G <%s,%+EVAL <%S>%nCLEANUP <%S>%->", gs, type,
863 gimple_try_eval (gs), gimple_try_cleanup (gs));
865 else
867 pp_string (buffer, "try");
868 newline_and_indent (buffer, spc + 2);
869 pp_character (buffer, '{');
870 pp_newline (buffer);
872 dump_gimple_seq (buffer, gimple_try_eval (gs), spc + 4, flags);
873 newline_and_indent (buffer, spc + 2);
874 pp_character (buffer, '}');
876 if (gimple_try_kind (gs) == GIMPLE_TRY_CATCH)
878 newline_and_indent (buffer, spc);
879 pp_string (buffer, "catch");
880 newline_and_indent (buffer, spc + 2);
881 pp_character (buffer, '{');
883 else if (gimple_try_kind (gs) == GIMPLE_TRY_FINALLY)
885 newline_and_indent (buffer, spc);
886 pp_string (buffer, "finally");
887 newline_and_indent (buffer, spc + 2);
888 pp_character (buffer, '{');
890 else
891 pp_string (buffer, " <UNKNOWN GIMPLE_TRY> {");
893 pp_newline (buffer);
894 dump_gimple_seq (buffer, gimple_try_cleanup (gs), spc + 4, flags);
895 newline_and_indent (buffer, spc + 2);
896 pp_character (buffer, '}');
901 /* Dump a GIMPLE_CATCH tuple on the pretty_printer BUFFER, SPC spaces of
902 indent. FLAGS specifies details to show in the dump (see TDF_* in
903 tree-pass.h). */
905 static void
906 dump_gimple_catch (pretty_printer *buffer, gimple gs, int spc, int flags)
908 if (flags & TDF_RAW)
909 dump_gimple_fmt (buffer, spc, flags, "%G <%T, %+CATCH <%S>%->", gs,
910 gimple_catch_types (gs), gimple_catch_handler (gs));
911 else
912 dump_gimple_fmt (buffer, spc, flags, "catch (%T)%+{%S}",
913 gimple_catch_types (gs), gimple_catch_handler (gs));
917 /* Dump a GIMPLE_EH_FILTER tuple on the pretty_printer BUFFER, SPC spaces of
918 indent. FLAGS specifies details to show in the dump (see TDF_* in
919 tree-pass.h). */
921 static void
922 dump_gimple_eh_filter (pretty_printer *buffer, gimple gs, int spc, int flags)
924 if (flags & TDF_RAW)
925 dump_gimple_fmt (buffer, spc, flags, "%G <%T, %+FAILURE <%S>%->", gs,
926 gimple_eh_filter_types (gs),
927 gimple_eh_filter_failure (gs));
928 else
929 dump_gimple_fmt (buffer, spc, flags, "<<<eh_filter (%T)>>>%+{%+%S%-}",
930 gimple_eh_filter_types (gs),
931 gimple_eh_filter_failure (gs));
935 /* Dump a GIMPLE_EH_MUST_NOT_THROW tuple. */
937 static void
938 dump_gimple_eh_must_not_throw (pretty_printer *buffer, gimple gs,
939 int spc, int flags)
941 if (flags & TDF_RAW)
942 dump_gimple_fmt (buffer, spc, flags, "%G <%T>", gs,
943 gimple_eh_must_not_throw_fndecl (gs));
944 else
945 dump_gimple_fmt (buffer, spc, flags, "<<<eh_must_not_throw (%T)>>>",
946 gimple_eh_must_not_throw_fndecl (gs));
950 /* Dump a GIMPLE_RESX tuple on the pretty_printer BUFFER, SPC spaces of
951 indent. FLAGS specifies details to show in the dump (see TDF_* in
952 tree-pass.h). */
954 static void
955 dump_gimple_resx (pretty_printer *buffer, gimple gs, int spc, int flags)
957 if (flags & TDF_RAW)
958 dump_gimple_fmt (buffer, spc, flags, "%G <%d>", gs,
959 gimple_resx_region (gs));
960 else
961 dump_gimple_fmt (buffer, spc, flags, "resx %d", gimple_resx_region (gs));
964 /* Dump a GIMPLE_EH_DISPATCH tuple on the pretty_printer BUFFER. */
966 static void
967 dump_gimple_eh_dispatch (pretty_printer *buffer, gimple gs, int spc, int flags)
969 if (flags & TDF_RAW)
970 dump_gimple_fmt (buffer, spc, flags, "%G <%d>", gs,
971 gimple_eh_dispatch_region (gs));
972 else
973 dump_gimple_fmt (buffer, spc, flags, "eh_dispatch %d",
974 gimple_eh_dispatch_region (gs));
977 /* Dump a GIMPLE_DEBUG tuple on the pretty_printer BUFFER, SPC spaces
978 of indent. FLAGS specifies details to show in the dump (see TDF_*
979 in tree-pass.h). */
981 static void
982 dump_gimple_debug (pretty_printer *buffer, gimple gs, int spc, int flags)
984 switch (gs->gsbase.subcode)
986 case GIMPLE_DEBUG_BIND:
987 if (flags & TDF_RAW)
988 dump_gimple_fmt (buffer, spc, flags, "%G BIND <%T, %T>", gs,
989 gimple_debug_bind_get_var (gs),
990 gimple_debug_bind_get_value (gs));
991 else
992 dump_gimple_fmt (buffer, spc, flags, "# DEBUG %T => %T",
993 gimple_debug_bind_get_var (gs),
994 gimple_debug_bind_get_value (gs));
995 break;
997 case GIMPLE_DEBUG_SOURCE_BIND:
998 if (flags & TDF_RAW)
999 dump_gimple_fmt (buffer, spc, flags, "%G SRCBIND <%T, %T>", gs,
1000 gimple_debug_source_bind_get_var (gs),
1001 gimple_debug_source_bind_get_value (gs));
1002 else
1003 dump_gimple_fmt (buffer, spc, flags, "# DEBUG %T s=> %T",
1004 gimple_debug_source_bind_get_var (gs),
1005 gimple_debug_source_bind_get_value (gs));
1006 break;
1008 default:
1009 gcc_unreachable ();
1013 /* Dump a GIMPLE_OMP_FOR tuple on the pretty_printer BUFFER. */
1014 static void
1015 dump_gimple_omp_for (pretty_printer *buffer, gimple gs, int spc, int flags)
1017 size_t i;
1019 if (flags & TDF_RAW)
1021 dump_gimple_fmt (buffer, spc, flags, "%G <%+BODY <%S>%nCLAUSES <", gs,
1022 gimple_omp_body (gs));
1023 dump_omp_clauses (buffer, gimple_omp_for_clauses (gs), spc, flags);
1024 dump_gimple_fmt (buffer, spc, flags, " >,");
1025 for (i = 0; i < gimple_omp_for_collapse (gs); i++)
1026 dump_gimple_fmt (buffer, spc, flags,
1027 "%+%T, %T, %T, %s, %T,%n",
1028 gimple_omp_for_index (gs, i),
1029 gimple_omp_for_initial (gs, i),
1030 gimple_omp_for_final (gs, i),
1031 tree_code_name[gimple_omp_for_cond (gs, i)],
1032 gimple_omp_for_incr (gs, i));
1033 dump_gimple_fmt (buffer, spc, flags, "PRE_BODY <%S>%->",
1034 gimple_omp_for_pre_body (gs));
1036 else
1038 pp_string (buffer, "#pragma omp for");
1039 dump_omp_clauses (buffer, gimple_omp_for_clauses (gs), spc, flags);
1040 for (i = 0; i < gimple_omp_for_collapse (gs); i++)
1042 if (i)
1043 spc += 2;
1044 newline_and_indent (buffer, spc);
1045 pp_string (buffer, "for (");
1046 dump_generic_node (buffer, gimple_omp_for_index (gs, i), spc,
1047 flags, false);
1048 pp_string (buffer, " = ");
1049 dump_generic_node (buffer, gimple_omp_for_initial (gs, i), spc,
1050 flags, false);
1051 pp_string (buffer, "; ");
1053 dump_generic_node (buffer, gimple_omp_for_index (gs, i), spc,
1054 flags, false);
1055 pp_space (buffer);
1056 switch (gimple_omp_for_cond (gs, i))
1058 case LT_EXPR:
1059 pp_character (buffer, '<');
1060 break;
1061 case GT_EXPR:
1062 pp_character (buffer, '>');
1063 break;
1064 case LE_EXPR:
1065 pp_string (buffer, "<=");
1066 break;
1067 case GE_EXPR:
1068 pp_string (buffer, ">=");
1069 break;
1070 default:
1071 gcc_unreachable ();
1073 pp_space (buffer);
1074 dump_generic_node (buffer, gimple_omp_for_final (gs, i), spc,
1075 flags, false);
1076 pp_string (buffer, "; ");
1078 dump_generic_node (buffer, gimple_omp_for_index (gs, i), spc,
1079 flags, false);
1080 pp_string (buffer, " = ");
1081 dump_generic_node (buffer, gimple_omp_for_incr (gs, i), spc,
1082 flags, false);
1083 pp_character (buffer, ')');
1086 if (!gimple_seq_empty_p (gimple_omp_body (gs)))
1088 newline_and_indent (buffer, spc + 2);
1089 pp_character (buffer, '{');
1090 pp_newline (buffer);
1091 dump_gimple_seq (buffer, gimple_omp_body (gs), spc + 4, flags);
1092 newline_and_indent (buffer, spc + 2);
1093 pp_character (buffer, '}');
1098 /* Dump a GIMPLE_OMP_CONTINUE tuple on the pretty_printer BUFFER. */
1100 static void
1101 dump_gimple_omp_continue (pretty_printer *buffer, gimple gs, int spc, int flags)
1103 if (flags & TDF_RAW)
1105 dump_gimple_fmt (buffer, spc, flags, "%G <%T, %T>", gs,
1106 gimple_omp_continue_control_def (gs),
1107 gimple_omp_continue_control_use (gs));
1109 else
1111 pp_string (buffer, "#pragma omp continue (");
1112 dump_generic_node (buffer, gimple_omp_continue_control_def (gs),
1113 spc, flags, false);
1114 pp_character (buffer, ',');
1115 pp_space (buffer);
1116 dump_generic_node (buffer, gimple_omp_continue_control_use (gs),
1117 spc, flags, false);
1118 pp_character (buffer, ')');
1122 /* Dump a GIMPLE_OMP_SINGLE tuple on the pretty_printer BUFFER. */
1124 static void
1125 dump_gimple_omp_single (pretty_printer *buffer, gimple gs, int spc, int flags)
1127 if (flags & TDF_RAW)
1129 dump_gimple_fmt (buffer, spc, flags, "%G <%+BODY <%S>%nCLAUSES <", gs,
1130 gimple_omp_body (gs));
1131 dump_omp_clauses (buffer, gimple_omp_single_clauses (gs), spc, flags);
1132 dump_gimple_fmt (buffer, spc, flags, " >");
1134 else
1136 pp_string (buffer, "#pragma omp single");
1137 dump_omp_clauses (buffer, gimple_omp_single_clauses (gs), spc, flags);
1138 if (!gimple_seq_empty_p (gimple_omp_body (gs)))
1140 newline_and_indent (buffer, spc + 2);
1141 pp_character (buffer, '{');
1142 pp_newline (buffer);
1143 dump_gimple_seq (buffer, gimple_omp_body (gs), spc + 4, flags);
1144 newline_and_indent (buffer, spc + 2);
1145 pp_character (buffer, '}');
1150 /* Dump a GIMPLE_OMP_SECTIONS tuple on the pretty_printer BUFFER. */
1152 static void
1153 dump_gimple_omp_sections (pretty_printer *buffer, gimple gs, int spc,
1154 int flags)
1156 if (flags & TDF_RAW)
1158 dump_gimple_fmt (buffer, spc, flags, "%G <%+BODY <%S>%nCLAUSES <", gs,
1159 gimple_omp_body (gs));
1160 dump_omp_clauses (buffer, gimple_omp_sections_clauses (gs), spc, flags);
1161 dump_gimple_fmt (buffer, spc, flags, " >");
1163 else
1165 pp_string (buffer, "#pragma omp sections");
1166 if (gimple_omp_sections_control (gs))
1168 pp_string (buffer, " <");
1169 dump_generic_node (buffer, gimple_omp_sections_control (gs), spc,
1170 flags, false);
1171 pp_character (buffer, '>');
1173 dump_omp_clauses (buffer, gimple_omp_sections_clauses (gs), spc, flags);
1174 if (!gimple_seq_empty_p (gimple_omp_body (gs)))
1176 newline_and_indent (buffer, spc + 2);
1177 pp_character (buffer, '{');
1178 pp_newline (buffer);
1179 dump_gimple_seq (buffer, gimple_omp_body (gs), spc + 4, flags);
1180 newline_and_indent (buffer, spc + 2);
1181 pp_character (buffer, '}');
1186 /* Dump a GIMPLE_OMP_{MASTER,ORDERED,SECTION} tuple on the pretty_printer
1187 BUFFER. */
1189 static void
1190 dump_gimple_omp_block (pretty_printer *buffer, gimple gs, int spc, int flags)
1192 if (flags & TDF_RAW)
1193 dump_gimple_fmt (buffer, spc, flags, "%G <%+BODY <%S> >", gs,
1194 gimple_omp_body (gs));
1195 else
1197 switch (gimple_code (gs))
1199 case GIMPLE_OMP_MASTER:
1200 pp_string (buffer, "#pragma omp master");
1201 break;
1202 case GIMPLE_OMP_ORDERED:
1203 pp_string (buffer, "#pragma omp ordered");
1204 break;
1205 case GIMPLE_OMP_SECTION:
1206 pp_string (buffer, "#pragma omp section");
1207 break;
1208 default:
1209 gcc_unreachable ();
1211 if (!gimple_seq_empty_p (gimple_omp_body (gs)))
1213 newline_and_indent (buffer, spc + 2);
1214 pp_character (buffer, '{');
1215 pp_newline (buffer);
1216 dump_gimple_seq (buffer, gimple_omp_body (gs), spc + 4, flags);
1217 newline_and_indent (buffer, spc + 2);
1218 pp_character (buffer, '}');
1223 /* Dump a GIMPLE_OMP_CRITICAL tuple on the pretty_printer BUFFER. */
1225 static void
1226 dump_gimple_omp_critical (pretty_printer *buffer, gimple gs, int spc,
1227 int flags)
1229 if (flags & TDF_RAW)
1230 dump_gimple_fmt (buffer, spc, flags, "%G <%+BODY <%S> >", gs,
1231 gimple_omp_body (gs));
1232 else
1234 pp_string (buffer, "#pragma omp critical");
1235 if (gimple_omp_critical_name (gs))
1237 pp_string (buffer, " (");
1238 dump_generic_node (buffer, gimple_omp_critical_name (gs), spc,
1239 flags, false);
1240 pp_character (buffer, ')');
1242 if (!gimple_seq_empty_p (gimple_omp_body (gs)))
1244 newline_and_indent (buffer, spc + 2);
1245 pp_character (buffer, '{');
1246 pp_newline (buffer);
1247 dump_gimple_seq (buffer, gimple_omp_body (gs), spc + 4, flags);
1248 newline_and_indent (buffer, spc + 2);
1249 pp_character (buffer, '}');
1254 /* Dump a GIMPLE_OMP_RETURN tuple on the pretty_printer BUFFER. */
1256 static void
1257 dump_gimple_omp_return (pretty_printer *buffer, gimple gs, int spc, int flags)
1259 if (flags & TDF_RAW)
1261 dump_gimple_fmt (buffer, spc, flags, "%G <nowait=%d>", gs,
1262 (int) gimple_omp_return_nowait_p (gs));
1264 else
1266 pp_string (buffer, "#pragma omp return");
1267 if (gimple_omp_return_nowait_p (gs))
1268 pp_string (buffer, "(nowait)");
1272 /* Dump a GIMPLE_ASM tuple on the pretty_printer BUFFER, SPC spaces of
1273 indent. FLAGS specifies details to show in the dump (see TDF_* in
1274 tree-pass.h). */
1276 static void
1277 dump_gimple_asm (pretty_printer *buffer, gimple gs, int spc, int flags)
1279 unsigned int i, n, f, fields;
1281 if (flags & TDF_RAW)
1283 dump_gimple_fmt (buffer, spc, flags, "%G <%+STRING <%n%s%n>", gs,
1284 gimple_asm_string (gs));
1286 n = gimple_asm_noutputs (gs);
1287 if (n)
1289 newline_and_indent (buffer, spc + 2);
1290 pp_string (buffer, "OUTPUT: ");
1291 for (i = 0; i < n; i++)
1293 dump_generic_node (buffer, gimple_asm_output_op (gs, i),
1294 spc, flags, false);
1295 if (i < n - 1)
1296 pp_string (buffer, ", ");
1300 n = gimple_asm_ninputs (gs);
1301 if (n)
1303 newline_and_indent (buffer, spc + 2);
1304 pp_string (buffer, "INPUT: ");
1305 for (i = 0; i < n; i++)
1307 dump_generic_node (buffer, gimple_asm_input_op (gs, i),
1308 spc, flags, false);
1309 if (i < n - 1)
1310 pp_string (buffer, ", ");
1314 n = gimple_asm_nclobbers (gs);
1315 if (n)
1317 newline_and_indent (buffer, spc + 2);
1318 pp_string (buffer, "CLOBBER: ");
1319 for (i = 0; i < n; i++)
1321 dump_generic_node (buffer, gimple_asm_clobber_op (gs, i),
1322 spc, flags, false);
1323 if (i < n - 1)
1324 pp_string (buffer, ", ");
1328 n = gimple_asm_nlabels (gs);
1329 if (n)
1331 newline_and_indent (buffer, spc + 2);
1332 pp_string (buffer, "LABEL: ");
1333 for (i = 0; i < n; i++)
1335 dump_generic_node (buffer, gimple_asm_label_op (gs, i),
1336 spc, flags, false);
1337 if (i < n - 1)
1338 pp_string (buffer, ", ");
1342 newline_and_indent (buffer, spc);
1343 pp_character (buffer, '>');
1345 else
1347 pp_string (buffer, "__asm__");
1348 if (gimple_asm_volatile_p (gs))
1349 pp_string (buffer, " __volatile__");
1350 if (gimple_asm_nlabels (gs))
1351 pp_string (buffer, " goto");
1352 pp_string (buffer, "(\"");
1353 pp_string (buffer, gimple_asm_string (gs));
1354 pp_string (buffer, "\"");
1356 if (gimple_asm_nlabels (gs))
1357 fields = 4;
1358 else if (gimple_asm_nclobbers (gs))
1359 fields = 3;
1360 else if (gimple_asm_ninputs (gs))
1361 fields = 2;
1362 else if (gimple_asm_noutputs (gs))
1363 fields = 1;
1364 else
1365 fields = 0;
1367 for (f = 0; f < fields; ++f)
1369 pp_string (buffer, " : ");
1371 switch (f)
1373 case 0:
1374 n = gimple_asm_noutputs (gs);
1375 for (i = 0; i < n; i++)
1377 dump_generic_node (buffer, gimple_asm_output_op (gs, i),
1378 spc, flags, false);
1379 if (i < n - 1)
1380 pp_string (buffer, ", ");
1382 break;
1384 case 1:
1385 n = gimple_asm_ninputs (gs);
1386 for (i = 0; i < n; i++)
1388 dump_generic_node (buffer, gimple_asm_input_op (gs, i),
1389 spc, flags, false);
1390 if (i < n - 1)
1391 pp_string (buffer, ", ");
1393 break;
1395 case 2:
1396 n = gimple_asm_nclobbers (gs);
1397 for (i = 0; i < n; i++)
1399 dump_generic_node (buffer, gimple_asm_clobber_op (gs, i),
1400 spc, flags, false);
1401 if (i < n - 1)
1402 pp_string (buffer, ", ");
1404 break;
1406 case 3:
1407 n = gimple_asm_nlabels (gs);
1408 for (i = 0; i < n; i++)
1410 dump_generic_node (buffer, gimple_asm_label_op (gs, i),
1411 spc, flags, false);
1412 if (i < n - 1)
1413 pp_string (buffer, ", ");
1415 break;
1417 default:
1418 gcc_unreachable ();
1422 pp_string (buffer, ");");
1427 /* Dump a PHI node PHI. BUFFER, SPC and FLAGS are as in
1428 dump_gimple_stmt. */
1430 static void
1431 dump_gimple_phi (pretty_printer *buffer, gimple phi, int spc, int flags)
1433 size_t i;
1434 tree lhs = gimple_phi_result (phi);
1436 if (flags & TDF_ALIAS
1437 && POINTER_TYPE_P (TREE_TYPE (lhs))
1438 && SSA_NAME_PTR_INFO (lhs))
1440 struct ptr_info_def *pi = SSA_NAME_PTR_INFO (lhs);
1441 pp_string (buffer, "PT = ");
1442 pp_points_to_solution (buffer, &pi->pt);
1443 newline_and_indent (buffer, spc);
1444 if (pi->align != 1)
1445 pp_printf (buffer, "# ALIGN = %u, MISALIGN = %u",
1446 pi->align, pi->misalign);
1447 newline_and_indent (buffer, spc);
1448 pp_string (buffer, "# ");
1451 if (flags & TDF_RAW)
1452 dump_gimple_fmt (buffer, spc, flags, "%G <%T, ", phi,
1453 gimple_phi_result (phi));
1454 else
1456 dump_generic_node (buffer, lhs, spc, flags, false);
1457 pp_string (buffer, " = PHI <");
1459 for (i = 0; i < gimple_phi_num_args (phi); i++)
1461 if ((flags & TDF_LINENO) && gimple_phi_arg_has_location (phi, i))
1463 expanded_location xloc;
1465 xloc = expand_location (gimple_phi_arg_location (phi, i));
1466 pp_character (buffer, '[');
1467 if (xloc.file)
1469 pp_string (buffer, xloc.file);
1470 pp_string (buffer, " : ");
1472 pp_decimal_int (buffer, xloc.line);
1473 pp_string (buffer, ":");
1474 pp_decimal_int (buffer, xloc.column);
1475 pp_string (buffer, "] ");
1477 dump_generic_node (buffer, gimple_phi_arg_def (phi, i), spc, flags,
1478 false);
1479 pp_character (buffer, '(');
1480 pp_decimal_int (buffer, gimple_phi_arg_edge (phi, i)->src->index);
1481 pp_character (buffer, ')');
1482 if (i < gimple_phi_num_args (phi) - 1)
1483 pp_string (buffer, ", ");
1485 pp_character (buffer, '>');
1489 /* Dump a GIMPLE_OMP_PARALLEL tuple on the pretty_printer BUFFER, SPC spaces
1490 of indent. FLAGS specifies details to show in the dump (see TDF_* in
1491 tree-pass.h). */
1493 static void
1494 dump_gimple_omp_parallel (pretty_printer *buffer, gimple gs, int spc,
1495 int flags)
1497 if (flags & TDF_RAW)
1499 dump_gimple_fmt (buffer, spc, flags, "%G <%+BODY <%S>%nCLAUSES <", gs,
1500 gimple_omp_body (gs));
1501 dump_omp_clauses (buffer, gimple_omp_parallel_clauses (gs), spc, flags);
1502 dump_gimple_fmt (buffer, spc, flags, " >, %T, %T%n>",
1503 gimple_omp_parallel_child_fn (gs),
1504 gimple_omp_parallel_data_arg (gs));
1506 else
1508 gimple_seq body;
1509 pp_string (buffer, "#pragma omp parallel");
1510 dump_omp_clauses (buffer, gimple_omp_parallel_clauses (gs), spc, flags);
1511 if (gimple_omp_parallel_child_fn (gs))
1513 pp_string (buffer, " [child fn: ");
1514 dump_generic_node (buffer, gimple_omp_parallel_child_fn (gs),
1515 spc, flags, false);
1516 pp_string (buffer, " (");
1517 if (gimple_omp_parallel_data_arg (gs))
1518 dump_generic_node (buffer, gimple_omp_parallel_data_arg (gs),
1519 spc, flags, false);
1520 else
1521 pp_string (buffer, "???");
1522 pp_string (buffer, ")]");
1524 body = gimple_omp_body (gs);
1525 if (body && gimple_code (gimple_seq_first_stmt (body)) != GIMPLE_BIND)
1527 newline_and_indent (buffer, spc + 2);
1528 pp_character (buffer, '{');
1529 pp_newline (buffer);
1530 dump_gimple_seq (buffer, body, spc + 4, flags);
1531 newline_and_indent (buffer, spc + 2);
1532 pp_character (buffer, '}');
1534 else if (body)
1536 pp_newline (buffer);
1537 dump_gimple_seq (buffer, body, spc + 2, flags);
1543 /* Dump a GIMPLE_OMP_TASK tuple on the pretty_printer BUFFER, SPC spaces
1544 of indent. FLAGS specifies details to show in the dump (see TDF_* in
1545 tree-pass.h). */
1547 static void
1548 dump_gimple_omp_task (pretty_printer *buffer, gimple gs, int spc,
1549 int flags)
1551 if (flags & TDF_RAW)
1553 dump_gimple_fmt (buffer, spc, flags, "%G <%+BODY <%S>%nCLAUSES <", gs,
1554 gimple_omp_body (gs));
1555 dump_omp_clauses (buffer, gimple_omp_task_clauses (gs), spc, flags);
1556 dump_gimple_fmt (buffer, spc, flags, " >, %T, %T, %T, %T, %T%n>",
1557 gimple_omp_task_child_fn (gs),
1558 gimple_omp_task_data_arg (gs),
1559 gimple_omp_task_copy_fn (gs),
1560 gimple_omp_task_arg_size (gs),
1561 gimple_omp_task_arg_size (gs));
1563 else
1565 gimple_seq body;
1566 pp_string (buffer, "#pragma omp task");
1567 dump_omp_clauses (buffer, gimple_omp_task_clauses (gs), spc, flags);
1568 if (gimple_omp_task_child_fn (gs))
1570 pp_string (buffer, " [child fn: ");
1571 dump_generic_node (buffer, gimple_omp_task_child_fn (gs),
1572 spc, flags, false);
1573 pp_string (buffer, " (");
1574 if (gimple_omp_task_data_arg (gs))
1575 dump_generic_node (buffer, gimple_omp_task_data_arg (gs),
1576 spc, flags, false);
1577 else
1578 pp_string (buffer, "???");
1579 pp_string (buffer, ")]");
1581 body = gimple_omp_body (gs);
1582 if (body && gimple_code (gimple_seq_first_stmt (body)) != GIMPLE_BIND)
1584 newline_and_indent (buffer, spc + 2);
1585 pp_character (buffer, '{');
1586 pp_newline (buffer);
1587 dump_gimple_seq (buffer, body, spc + 4, flags);
1588 newline_and_indent (buffer, spc + 2);
1589 pp_character (buffer, '}');
1591 else if (body)
1593 pp_newline (buffer);
1594 dump_gimple_seq (buffer, body, spc + 2, flags);
1600 /* Dump a GIMPLE_OMP_ATOMIC_LOAD tuple on the pretty_printer BUFFER, SPC
1601 spaces of indent. FLAGS specifies details to show in the dump (see TDF_*
1602 in tree-pass.h). */
1604 static void
1605 dump_gimple_omp_atomic_load (pretty_printer *buffer, gimple gs, int spc,
1606 int flags)
1608 if (flags & TDF_RAW)
1610 dump_gimple_fmt (buffer, spc, flags, "%G <%T, %T>", gs,
1611 gimple_omp_atomic_load_lhs (gs),
1612 gimple_omp_atomic_load_rhs (gs));
1614 else
1616 pp_string (buffer, "#pragma omp atomic_load");
1617 newline_and_indent (buffer, spc + 2);
1618 dump_generic_node (buffer, gimple_omp_atomic_load_lhs (gs),
1619 spc, flags, false);
1620 pp_space (buffer);
1621 pp_character (buffer, '=');
1622 pp_space (buffer);
1623 pp_character (buffer, '*');
1624 dump_generic_node (buffer, gimple_omp_atomic_load_rhs (gs),
1625 spc, flags, false);
1629 /* Dump a GIMPLE_OMP_ATOMIC_STORE tuple on the pretty_printer BUFFER, SPC
1630 spaces of indent. FLAGS specifies details to show in the dump (see TDF_*
1631 in tree-pass.h). */
1633 static void
1634 dump_gimple_omp_atomic_store (pretty_printer *buffer, gimple gs, int spc,
1635 int flags)
1637 if (flags & TDF_RAW)
1639 dump_gimple_fmt (buffer, spc, flags, "%G <%T>", gs,
1640 gimple_omp_atomic_store_val (gs));
1642 else
1644 pp_string (buffer, "#pragma omp atomic_store (");
1645 dump_generic_node (buffer, gimple_omp_atomic_store_val (gs),
1646 spc, flags, false);
1647 pp_character (buffer, ')');
1652 /* Dump all the memory operands for statement GS. BUFFER, SPC and
1653 FLAGS are as in dump_gimple_stmt. */
1655 static void
1656 dump_gimple_mem_ops (pretty_printer *buffer, gimple gs, int spc, int flags)
1658 tree vdef = gimple_vdef (gs);
1659 tree vuse = gimple_vuse (gs);
1661 if (!ssa_operands_active () || !gimple_references_memory_p (gs))
1662 return;
1664 if (vdef != NULL_TREE)
1666 pp_string (buffer, "# ");
1667 dump_generic_node (buffer, vdef, spc + 2, flags, false);
1668 pp_string (buffer, " = VDEF <");
1669 dump_generic_node (buffer, vuse, spc + 2, flags, false);
1670 pp_character (buffer, '>');
1671 newline_and_indent (buffer, spc);
1673 else if (vuse != NULL_TREE)
1675 pp_string (buffer, "# VUSE <");
1676 dump_generic_node (buffer, vuse, spc + 2, flags, false);
1677 pp_character (buffer, '>');
1678 newline_and_indent (buffer, spc);
1683 /* Dump the gimple statement GS on the pretty printer BUFFER, SPC
1684 spaces of indent. FLAGS specifies details to show in the dump (see
1685 TDF_* in tree-pass.h). */
1687 void
1688 dump_gimple_stmt (pretty_printer *buffer, gimple gs, int spc, int flags)
1690 if (!gs)
1691 return;
1693 if (flags & TDF_STMTADDR)
1694 pp_printf (buffer, "<&%p> ", (void *) gs);
1696 if ((flags & TDF_LINENO) && gimple_has_location (gs))
1698 expanded_location xloc = expand_location (gimple_location (gs));
1699 pp_character (buffer, '[');
1700 if (xloc.file)
1702 pp_string (buffer, xloc.file);
1703 pp_string (buffer, " : ");
1705 pp_decimal_int (buffer, xloc.line);
1706 pp_string (buffer, ":");
1707 pp_decimal_int (buffer, xloc.column);
1708 pp_string (buffer, "] ");
1711 if (flags & TDF_EH)
1713 int lp_nr = lookup_stmt_eh_lp (gs);
1714 if (lp_nr > 0)
1715 pp_printf (buffer, "[LP %d] ", lp_nr);
1716 else if (lp_nr < 0)
1717 pp_printf (buffer, "[MNT %d] ", -lp_nr);
1720 if ((flags & (TDF_VOPS|TDF_MEMSYMS))
1721 && gimple_has_mem_ops (gs))
1722 dump_gimple_mem_ops (buffer, gs, spc, flags);
1724 if ((flags & TDF_ALIAS)
1725 && gimple_has_lhs (gs))
1727 tree lhs = gimple_get_lhs (gs);
1728 if (TREE_CODE (lhs) == SSA_NAME
1729 && POINTER_TYPE_P (TREE_TYPE (lhs))
1730 && SSA_NAME_PTR_INFO (lhs))
1732 struct ptr_info_def *pi = SSA_NAME_PTR_INFO (lhs);
1733 pp_string (buffer, "# PT = ");
1734 pp_points_to_solution (buffer, &pi->pt);
1735 newline_and_indent (buffer, spc);
1736 if (pi->align != 1)
1738 pp_printf (buffer, "# ALIGN = %u, MISALIGN = %u",
1739 pi->align, pi->misalign);
1740 newline_and_indent (buffer, spc);
1745 switch (gimple_code (gs))
1747 case GIMPLE_ASM:
1748 dump_gimple_asm (buffer, gs, spc, flags);
1749 break;
1751 case GIMPLE_ASSIGN:
1752 dump_gimple_assign (buffer, gs, spc, flags);
1753 break;
1755 case GIMPLE_BIND:
1756 dump_gimple_bind (buffer, gs, spc, flags);
1757 break;
1759 case GIMPLE_CALL:
1760 dump_gimple_call (buffer, gs, spc, flags);
1761 break;
1763 case GIMPLE_COND:
1764 dump_gimple_cond (buffer, gs, spc, flags);
1765 break;
1767 case GIMPLE_LABEL:
1768 dump_gimple_label (buffer, gs, spc, flags);
1769 break;
1771 case GIMPLE_GOTO:
1772 dump_gimple_goto (buffer, gs, spc, flags);
1773 break;
1775 case GIMPLE_NOP:
1776 pp_string (buffer, "GIMPLE_NOP");
1777 break;
1779 case GIMPLE_RETURN:
1780 dump_gimple_return (buffer, gs, spc, flags);
1781 break;
1783 case GIMPLE_SWITCH:
1784 dump_gimple_switch (buffer, gs, spc, flags);
1785 break;
1787 case GIMPLE_TRY:
1788 dump_gimple_try (buffer, gs, spc, flags);
1789 break;
1791 case GIMPLE_PHI:
1792 dump_gimple_phi (buffer, gs, spc, flags);
1793 break;
1795 case GIMPLE_OMP_PARALLEL:
1796 dump_gimple_omp_parallel (buffer, gs, spc, flags);
1797 break;
1799 case GIMPLE_OMP_TASK:
1800 dump_gimple_omp_task (buffer, gs, spc, flags);
1801 break;
1803 case GIMPLE_OMP_ATOMIC_LOAD:
1804 dump_gimple_omp_atomic_load (buffer, gs, spc, flags);
1806 break;
1808 case GIMPLE_OMP_ATOMIC_STORE:
1809 dump_gimple_omp_atomic_store (buffer, gs, spc, flags);
1810 break;
1812 case GIMPLE_OMP_FOR:
1813 dump_gimple_omp_for (buffer, gs, spc, flags);
1814 break;
1816 case GIMPLE_OMP_CONTINUE:
1817 dump_gimple_omp_continue (buffer, gs, spc, flags);
1818 break;
1820 case GIMPLE_OMP_SINGLE:
1821 dump_gimple_omp_single (buffer, gs, spc, flags);
1822 break;
1824 case GIMPLE_OMP_RETURN:
1825 dump_gimple_omp_return (buffer, gs, spc, flags);
1826 break;
1828 case GIMPLE_OMP_SECTIONS:
1829 dump_gimple_omp_sections (buffer, gs, spc, flags);
1830 break;
1832 case GIMPLE_OMP_SECTIONS_SWITCH:
1833 pp_string (buffer, "GIMPLE_SECTIONS_SWITCH");
1834 break;
1836 case GIMPLE_OMP_MASTER:
1837 case GIMPLE_OMP_ORDERED:
1838 case GIMPLE_OMP_SECTION:
1839 dump_gimple_omp_block (buffer, gs, spc, flags);
1840 break;
1842 case GIMPLE_OMP_CRITICAL:
1843 dump_gimple_omp_critical (buffer, gs, spc, flags);
1844 break;
1846 case GIMPLE_CATCH:
1847 dump_gimple_catch (buffer, gs, spc, flags);
1848 break;
1850 case GIMPLE_EH_FILTER:
1851 dump_gimple_eh_filter (buffer, gs, spc, flags);
1852 break;
1854 case GIMPLE_EH_MUST_NOT_THROW:
1855 dump_gimple_eh_must_not_throw (buffer, gs, spc, flags);
1856 break;
1858 case GIMPLE_RESX:
1859 dump_gimple_resx (buffer, gs, spc, flags);
1860 break;
1862 case GIMPLE_EH_DISPATCH:
1863 dump_gimple_eh_dispatch (buffer, gs, spc, flags);
1864 break;
1866 case GIMPLE_DEBUG:
1867 dump_gimple_debug (buffer, gs, spc, flags);
1868 break;
1870 case GIMPLE_PREDICT:
1871 pp_string (buffer, "// predicted ");
1872 if (gimple_predict_outcome (gs))
1873 pp_string (buffer, "likely by ");
1874 else
1875 pp_string (buffer, "unlikely by ");
1876 pp_string (buffer, predictor_name (gimple_predict_predictor (gs)));
1877 pp_string (buffer, " predictor.");
1878 break;
1880 default:
1881 GIMPLE_NIY;
1884 /* If we're building a diagnostic, the formatted text will be
1885 written into BUFFER's stream by the caller; otherwise, write it
1886 now. */
1887 if (!(flags & TDF_DIAGNOSTIC))
1888 pp_write_text_to_stream (buffer);
1892 /* Dumps header of basic block BB to buffer BUFFER indented by INDENT
1893 spaces and details described by flags. */
1895 static void
1896 dump_bb_header (pretty_printer *buffer, basic_block bb, int indent, int flags)
1898 edge e;
1899 gimple stmt;
1900 edge_iterator ei;
1902 if (flags & TDF_BLOCKS)
1904 INDENT (indent);
1905 pp_string (buffer, "# BLOCK ");
1906 pp_decimal_int (buffer, bb->index);
1907 if (bb->frequency)
1909 pp_string (buffer, " freq:");
1910 pp_decimal_int (buffer, bb->frequency);
1912 if (bb->count)
1914 pp_string (buffer, " count:");
1915 pp_widest_integer (buffer, bb->count);
1918 if (flags & TDF_LINENO)
1920 gimple_stmt_iterator gsi;
1922 for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
1923 if (!is_gimple_debug (gsi_stmt (gsi))
1924 && get_lineno (gsi_stmt (gsi)) != UNKNOWN_LOCATION)
1926 pp_string (buffer, ", starting at line ");
1927 pp_decimal_int (buffer, get_lineno (gsi_stmt (gsi)));
1928 break;
1931 if (bb->discriminator)
1933 pp_string (buffer, ", discriminator ");
1934 pp_decimal_int (buffer, bb->discriminator);
1937 newline_and_indent (buffer, indent);
1939 pp_string (buffer, "# PRED:");
1940 pp_write_text_to_stream (buffer);
1941 FOR_EACH_EDGE (e, ei, bb->preds)
1942 if (flags & TDF_SLIM)
1944 pp_character (buffer, ' ');
1945 if (e->src == ENTRY_BLOCK_PTR)
1946 pp_string (buffer, "ENTRY");
1947 else
1948 pp_decimal_int (buffer, e->src->index);
1950 else
1951 dump_edge_info (buffer->buffer->stream, e, 0);
1952 pp_newline (buffer);
1954 else
1956 stmt = first_stmt (bb);
1957 if (!stmt || gimple_code (stmt) != GIMPLE_LABEL)
1959 INDENT (indent - 2);
1960 pp_string (buffer, "<bb ");
1961 pp_decimal_int (buffer, bb->index);
1962 pp_string (buffer, ">:");
1963 pp_newline (buffer);
1966 pp_write_text_to_stream (buffer);
1967 if (cfun)
1968 check_bb_profile (bb, buffer->buffer->stream);
1972 /* Dumps end of basic block BB to buffer BUFFER indented by INDENT
1973 spaces. */
1975 static void
1976 dump_bb_end (pretty_printer *buffer, basic_block bb, int indent, int flags)
1978 edge e;
1979 edge_iterator ei;
1981 INDENT (indent);
1982 pp_string (buffer, "# SUCC:");
1983 pp_write_text_to_stream (buffer);
1984 FOR_EACH_EDGE (e, ei, bb->succs)
1985 if (flags & TDF_SLIM)
1987 pp_character (buffer, ' ');
1988 if (e->dest == EXIT_BLOCK_PTR)
1989 pp_string (buffer, "EXIT");
1990 else
1991 pp_decimal_int (buffer, e->dest->index);
1993 else
1994 dump_edge_info (buffer->buffer->stream, e, 1);
1995 pp_newline (buffer);
1999 /* Dump PHI nodes of basic block BB to BUFFER with details described
2000 by FLAGS and indented by INDENT spaces. */
2002 static void
2003 dump_phi_nodes (pretty_printer *buffer, basic_block bb, int indent, int flags)
2005 gimple_stmt_iterator i;
2007 for (i = gsi_start_phis (bb); !gsi_end_p (i); gsi_next (&i))
2009 gimple phi = gsi_stmt (i);
2010 if (is_gimple_reg (gimple_phi_result (phi)) || (flags & TDF_VOPS))
2012 INDENT (indent);
2013 pp_string (buffer, "# ");
2014 dump_gimple_phi (buffer, phi, indent, flags);
2015 pp_newline (buffer);
2021 /* Dump jump to basic block BB that is represented implicitly in the cfg
2022 to BUFFER. */
2024 static void
2025 pp_cfg_jump (pretty_printer *buffer, basic_block bb)
2027 gimple stmt;
2029 stmt = first_stmt (bb);
2031 pp_string (buffer, "goto <bb ");
2032 pp_decimal_int (buffer, bb->index);
2033 pp_character (buffer, '>');
2034 if (stmt && gimple_code (stmt) == GIMPLE_LABEL)
2036 pp_string (buffer, " (");
2037 dump_generic_node (buffer, gimple_label_label (stmt), 0, 0, false);
2038 pp_character (buffer, ')');
2039 pp_semicolon (buffer);
2041 else
2042 pp_semicolon (buffer);
2046 /* Dump edges represented implicitly in basic block BB to BUFFER, indented
2047 by INDENT spaces, with details given by FLAGS. */
2049 static void
2050 dump_implicit_edges (pretty_printer *buffer, basic_block bb, int indent,
2051 int flags)
2053 edge e;
2054 gimple stmt;
2056 stmt = last_stmt (bb);
2058 if (stmt && gimple_code (stmt) == GIMPLE_COND)
2060 edge true_edge, false_edge;
2062 /* When we are emitting the code or changing CFG, it is possible that
2063 the edges are not yet created. When we are using debug_bb in such
2064 a situation, we do not want it to crash. */
2065 if (EDGE_COUNT (bb->succs) != 2)
2066 return;
2067 extract_true_false_edges_from_block (bb, &true_edge, &false_edge);
2069 INDENT (indent + 2);
2070 pp_cfg_jump (buffer, true_edge->dest);
2071 newline_and_indent (buffer, indent);
2072 pp_string (buffer, "else");
2073 newline_and_indent (buffer, indent + 2);
2074 pp_cfg_jump (buffer, false_edge->dest);
2075 pp_newline (buffer);
2076 return;
2079 /* If there is a fallthru edge, we may need to add an artificial
2080 goto to the dump. */
2081 e = find_fallthru_edge (bb->succs);
2083 if (e && e->dest != bb->next_bb)
2085 INDENT (indent);
2087 if ((flags & TDF_LINENO)
2088 && e->goto_locus != UNKNOWN_LOCATION
2091 expanded_location goto_xloc;
2092 goto_xloc = expand_location (e->goto_locus);
2093 pp_character (buffer, '[');
2094 if (goto_xloc.file)
2096 pp_string (buffer, goto_xloc.file);
2097 pp_string (buffer, " : ");
2099 pp_decimal_int (buffer, goto_xloc.line);
2100 pp_string (buffer, " : ");
2101 pp_decimal_int (buffer, goto_xloc.column);
2102 pp_string (buffer, "] ");
2105 pp_cfg_jump (buffer, e->dest);
2106 pp_newline (buffer);
2111 /* Dumps basic block BB to buffer BUFFER with details described by FLAGS and
2112 indented by INDENT spaces. */
2114 static void
2115 gimple_dump_bb_buff (pretty_printer *buffer, basic_block bb, int indent,
2116 int flags)
2118 gimple_stmt_iterator gsi;
2119 gimple stmt;
2120 int label_indent = indent - 2;
2122 if (label_indent < 0)
2123 label_indent = 0;
2125 dump_bb_header (buffer, bb, indent, flags);
2126 dump_phi_nodes (buffer, bb, indent, flags);
2128 for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
2130 int curr_indent;
2132 stmt = gsi_stmt (gsi);
2134 curr_indent = gimple_code (stmt) == GIMPLE_LABEL ? label_indent : indent;
2136 INDENT (curr_indent);
2137 dump_gimple_stmt (buffer, stmt, curr_indent, flags);
2138 pp_newline (buffer);
2139 dump_histograms_for_stmt (cfun, buffer->buffer->stream, stmt);
2142 dump_implicit_edges (buffer, bb, indent, flags);
2144 if (flags & TDF_BLOCKS)
2145 dump_bb_end (buffer, bb, indent, flags);
2149 /* Dumps basic block BB to FILE with details described by FLAGS and
2150 indented by INDENT spaces. */
2152 void
2153 gimple_dump_bb (basic_block bb, FILE *file, int indent, int flags)
2155 maybe_init_pretty_print (file);
2156 gimple_dump_bb_buff (&buffer, bb, indent, flags);
2157 pp_flush (&buffer);