2015-06-11 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / tree-dump.c
blob46a3d55165aa2a0ac03a2f5dddcba552a5c9d5a7
1 /* Tree-dumping functionality for intermediate representation.
2 Copyright (C) 1999-2015 Free Software Foundation, Inc.
3 Written by Mark Mitchell <mark@codesourcery.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
10 version.
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
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/>. */
21 #include "config.h"
22 #include "system.h"
23 #include "coretypes.h"
24 #include "tm.h"
25 #include "input.h"
26 #include "alias.h"
27 #include "symtab.h"
28 #include "tree.h"
29 #include "splay-tree.h"
30 #include "filenames.h"
31 #include "tree-dump.h"
32 #include "langhooks.h"
33 #include "tree-iterator.h"
34 #include "tree-pretty-print.h"
35 #include "tree-cfg.h"
36 #include "wide-int-print.h"
38 static unsigned int queue (dump_info_p, const_tree, int);
39 static void dump_index (dump_info_p, unsigned int);
40 static void dequeue_and_dump (dump_info_p);
41 static void dump_new_line (dump_info_p);
42 static void dump_maybe_newline (dump_info_p);
44 /* Add T to the end of the queue of nodes to dump. Returns the index
45 assigned to T. */
47 static unsigned int
48 queue (dump_info_p di, const_tree t, int flags)
50 dump_queue_p dq;
51 dump_node_info_p dni;
52 unsigned int index;
54 /* Assign the next available index to T. */
55 index = ++di->index;
57 /* Obtain a new queue node. */
58 if (di->free_list)
60 dq = di->free_list;
61 di->free_list = dq->next;
63 else
64 dq = XNEW (struct dump_queue);
66 /* Create a new entry in the splay-tree. */
67 dni = XNEW (struct dump_node_info);
68 dni->index = index;
69 dni->binfo_p = ((flags & DUMP_BINFO) != 0);
70 dq->node = splay_tree_insert (di->nodes, (splay_tree_key) t,
71 (splay_tree_value) dni);
73 /* Add it to the end of the queue. */
74 dq->next = 0;
75 if (!di->queue_end)
76 di->queue = dq;
77 else
78 di->queue_end->next = dq;
79 di->queue_end = dq;
81 /* Return the index. */
82 return index;
85 static void
86 dump_index (dump_info_p di, unsigned int index)
88 fprintf (di->stream, "@%-6u ", index);
89 di->column += 8;
92 /* If T has not already been output, queue it for subsequent output.
93 FIELD is a string to print before printing the index. Then, the
94 index of T is printed. */
96 void
97 queue_and_dump_index (dump_info_p di, const char *field, const_tree t, int flags)
99 unsigned int index;
100 splay_tree_node n;
102 /* If there's no node, just return. This makes for fewer checks in
103 our callers. */
104 if (!t)
105 return;
107 /* See if we've already queued or dumped this node. */
108 n = splay_tree_lookup (di->nodes, (splay_tree_key) t);
109 if (n)
110 index = ((dump_node_info_p) n->value)->index;
111 else
112 /* If we haven't, add it to the queue. */
113 index = queue (di, t, flags);
115 /* Print the index of the node. */
116 dump_maybe_newline (di);
117 fprintf (di->stream, "%-4s: ", field);
118 di->column += 6;
119 dump_index (di, index);
122 /* Dump the type of T. */
124 void
125 queue_and_dump_type (dump_info_p di, const_tree t)
127 queue_and_dump_index (di, "type", TREE_TYPE (t), DUMP_NONE);
130 /* Dump column control */
131 #define SOL_COLUMN 25 /* Start of line column. */
132 #define EOL_COLUMN 55 /* End of line column. */
133 #define COLUMN_ALIGNMENT 15 /* Alignment. */
135 /* Insert a new line in the dump output, and indent to an appropriate
136 place to start printing more fields. */
138 static void
139 dump_new_line (dump_info_p di)
141 fprintf (di->stream, "\n%*s", SOL_COLUMN, "");
142 di->column = SOL_COLUMN;
145 /* If necessary, insert a new line. */
147 static void
148 dump_maybe_newline (dump_info_p di)
150 int extra;
152 /* See if we need a new line. */
153 if (di->column > EOL_COLUMN)
154 dump_new_line (di);
155 /* See if we need any padding. */
156 else if ((extra = (di->column - SOL_COLUMN) % COLUMN_ALIGNMENT) != 0)
158 fprintf (di->stream, "%*s", COLUMN_ALIGNMENT - extra, "");
159 di->column += COLUMN_ALIGNMENT - extra;
163 /* Dump FUNCTION_DECL FN as tree dump PHASE. */
165 void
166 dump_function (int phase, tree fn)
168 FILE *stream;
169 int flags;
171 stream = dump_begin (phase, &flags);
172 if (stream)
174 dump_function_to_file (fn, stream, flags);
175 dump_end (phase, stream);
179 /* Dump pointer PTR using FIELD to identify it. */
181 void
182 dump_pointer (dump_info_p di, const char *field, void *ptr)
184 dump_maybe_newline (di);
185 fprintf (di->stream, "%-4s: %-8" HOST_WIDE_INT_PRINT "x ", field,
186 (unsigned HOST_WIDE_INT) (uintptr_t) ptr);
187 di->column += 15;
190 /* Dump integer I using FIELD to identify it. */
192 void
193 dump_int (dump_info_p di, const char *field, int i)
195 dump_maybe_newline (di);
196 fprintf (di->stream, "%-4s: %-7d ", field, i);
197 di->column += 14;
200 /* Dump the floating point value R, using FIELD to identify it. */
202 static void
203 dump_real (dump_info_p di, const char *field, const REAL_VALUE_TYPE *r)
205 char buf[32];
206 real_to_decimal (buf, r, sizeof (buf), 0, true);
207 dump_maybe_newline (di);
208 fprintf (di->stream, "%-4s: %s ", field, buf);
209 di->column += strlen (buf) + 7;
212 /* Dump the fixed-point value F, using FIELD to identify it. */
214 static void
215 dump_fixed (dump_info_p di, const char *field, const FIXED_VALUE_TYPE *f)
217 char buf[32];
218 fixed_to_decimal (buf, f, sizeof (buf));
219 dump_maybe_newline (di);
220 fprintf (di->stream, "%-4s: %s ", field, buf);
221 di->column += strlen (buf) + 7;
225 /* Dump the string S. */
227 void
228 dump_string (dump_info_p di, const char *string)
230 dump_maybe_newline (di);
231 fprintf (di->stream, "%-13s ", string);
232 if (strlen (string) > 13)
233 di->column += strlen (string) + 1;
234 else
235 di->column += 14;
238 /* Dump the string field S. */
240 void
241 dump_string_field (dump_info_p di, const char *field, const char *string)
243 dump_maybe_newline (di);
244 fprintf (di->stream, "%-4s: %-7s ", field, string);
245 if (strlen (string) > 7)
246 di->column += 6 + strlen (string) + 1;
247 else
248 di->column += 14;
251 /* Dump the next node in the queue. */
253 static void
254 dequeue_and_dump (dump_info_p di)
256 dump_queue_p dq;
257 splay_tree_node stn;
258 dump_node_info_p dni;
259 tree t;
260 unsigned int index;
261 enum tree_code code;
262 enum tree_code_class code_class;
263 const char* code_name;
265 /* Get the next node from the queue. */
266 dq = di->queue;
267 stn = dq->node;
268 t = (tree) stn->key;
269 dni = (dump_node_info_p) stn->value;
270 index = dni->index;
272 /* Remove the node from the queue, and put it on the free list. */
273 di->queue = dq->next;
274 if (!di->queue)
275 di->queue_end = 0;
276 dq->next = di->free_list;
277 di->free_list = dq;
279 /* Print the node index. */
280 dump_index (di, index);
281 /* And the type of node this is. */
282 if (dni->binfo_p)
283 code_name = "binfo";
284 else
285 code_name = get_tree_code_name (TREE_CODE (t));
286 fprintf (di->stream, "%-16s ", code_name);
287 di->column = 25;
289 /* Figure out what kind of node this is. */
290 code = TREE_CODE (t);
291 code_class = TREE_CODE_CLASS (code);
293 /* Although BINFOs are TREE_VECs, we dump them specially so as to be
294 more informative. */
295 if (dni->binfo_p)
297 unsigned ix;
298 tree base;
299 vec<tree, va_gc> *accesses = BINFO_BASE_ACCESSES (t);
301 dump_child ("type", BINFO_TYPE (t));
303 if (BINFO_VIRTUAL_P (t))
304 dump_string_field (di, "spec", "virt");
306 dump_int (di, "bases", BINFO_N_BASE_BINFOS (t));
307 for (ix = 0; BINFO_BASE_ITERATE (t, ix, base); ix++)
309 tree access = (accesses ? (*accesses)[ix] : access_public_node);
310 const char *string = NULL;
312 if (access == access_public_node)
313 string = "pub";
314 else if (access == access_protected_node)
315 string = "prot";
316 else if (access == access_private_node)
317 string = "priv";
318 else
319 gcc_unreachable ();
321 dump_string_field (di, "accs", string);
322 queue_and_dump_index (di, "binf", base, DUMP_BINFO);
325 goto done;
328 /* We can knock off a bunch of expression nodes in exactly the same
329 way. */
330 if (IS_EXPR_CODE_CLASS (code_class))
332 /* If we're dumping children, dump them now. */
333 queue_and_dump_type (di, t);
335 switch (code_class)
337 case tcc_unary:
338 dump_child ("op 0", TREE_OPERAND (t, 0));
339 break;
341 case tcc_binary:
342 case tcc_comparison:
343 dump_child ("op 0", TREE_OPERAND (t, 0));
344 dump_child ("op 1", TREE_OPERAND (t, 1));
345 break;
347 case tcc_expression:
348 case tcc_reference:
349 case tcc_statement:
350 case tcc_vl_exp:
351 /* These nodes are handled explicitly below. */
352 break;
354 default:
355 gcc_unreachable ();
358 else if (DECL_P (t))
360 expanded_location xloc;
361 /* All declarations have names. */
362 if (DECL_NAME (t))
363 dump_child ("name", DECL_NAME (t));
364 if (DECL_ASSEMBLER_NAME_SET_P (t)
365 && DECL_ASSEMBLER_NAME (t) != DECL_NAME (t))
366 dump_child ("mngl", DECL_ASSEMBLER_NAME (t));
367 if (DECL_ABSTRACT_ORIGIN (t))
368 dump_child ("orig", DECL_ABSTRACT_ORIGIN (t));
369 /* And types. */
370 queue_and_dump_type (di, t);
371 dump_child ("scpe", DECL_CONTEXT (t));
372 /* And a source position. */
373 xloc = expand_location (DECL_SOURCE_LOCATION (t));
374 if (xloc.file)
376 const char *filename = lbasename (xloc.file);
378 dump_maybe_newline (di);
379 fprintf (di->stream, "srcp: %s:%-6d ", filename,
380 xloc.line);
381 di->column += 6 + strlen (filename) + 8;
383 /* And any declaration can be compiler-generated. */
384 if (CODE_CONTAINS_STRUCT (TREE_CODE (t), TS_DECL_COMMON)
385 && DECL_ARTIFICIAL (t))
386 dump_string_field (di, "note", "artificial");
387 if (DECL_CHAIN (t) && !dump_flag (di, TDF_SLIM, NULL))
388 dump_child ("chain", DECL_CHAIN (t));
390 else if (code_class == tcc_type)
392 /* All types have qualifiers. */
393 int quals = lang_hooks.tree_dump.type_quals (t);
395 if (quals != TYPE_UNQUALIFIED)
397 fprintf (di->stream, "qual: %c%c%c ",
398 (quals & TYPE_QUAL_CONST) ? 'c' : ' ',
399 (quals & TYPE_QUAL_VOLATILE) ? 'v' : ' ',
400 (quals & TYPE_QUAL_RESTRICT) ? 'r' : ' ');
401 di->column += 14;
404 /* All types have associated declarations. */
405 dump_child ("name", TYPE_NAME (t));
407 /* All types have a main variant. */
408 if (TYPE_MAIN_VARIANT (t) != t)
409 dump_child ("unql", TYPE_MAIN_VARIANT (t));
411 /* And sizes. */
412 dump_child ("size", TYPE_SIZE (t));
414 /* All types have alignments. */
415 dump_int (di, "algn", TYPE_ALIGN (t));
417 else if (code_class == tcc_constant)
418 /* All constants can have types. */
419 queue_and_dump_type (di, t);
421 /* Give the language-specific code a chance to print something. If
422 it's completely taken care of things, don't bother printing
423 anything more ourselves. */
424 if (lang_hooks.tree_dump.dump_tree (di, t))
425 goto done;
427 /* Now handle the various kinds of nodes. */
428 switch (code)
430 int i;
432 case IDENTIFIER_NODE:
433 dump_string_field (di, "strg", IDENTIFIER_POINTER (t));
434 dump_int (di, "lngt", IDENTIFIER_LENGTH (t));
435 break;
437 case TREE_LIST:
438 dump_child ("purp", TREE_PURPOSE (t));
439 dump_child ("valu", TREE_VALUE (t));
440 dump_child ("chan", TREE_CHAIN (t));
441 break;
443 case STATEMENT_LIST:
445 tree_stmt_iterator it;
446 for (i = 0, it = tsi_start (t); !tsi_end_p (it); tsi_next (&it), i++)
448 char buffer[32];
449 sprintf (buffer, "%u", i);
450 dump_child (buffer, tsi_stmt (it));
453 break;
455 case TREE_VEC:
456 dump_int (di, "lngt", TREE_VEC_LENGTH (t));
457 for (i = 0; i < TREE_VEC_LENGTH (t); ++i)
459 char buffer[32];
460 sprintf (buffer, "%u", i);
461 dump_child (buffer, TREE_VEC_ELT (t, i));
463 break;
465 case INTEGER_TYPE:
466 case ENUMERAL_TYPE:
467 dump_int (di, "prec", TYPE_PRECISION (t));
468 dump_string_field (di, "sign", TYPE_UNSIGNED (t) ? "unsigned": "signed");
469 dump_child ("min", TYPE_MIN_VALUE (t));
470 dump_child ("max", TYPE_MAX_VALUE (t));
472 if (code == ENUMERAL_TYPE)
473 dump_child ("csts", TYPE_VALUES (t));
474 break;
476 case REAL_TYPE:
477 dump_int (di, "prec", TYPE_PRECISION (t));
478 break;
480 case FIXED_POINT_TYPE:
481 dump_int (di, "prec", TYPE_PRECISION (t));
482 dump_string_field (di, "sign", TYPE_UNSIGNED (t) ? "unsigned": "signed");
483 dump_string_field (di, "saturating",
484 TYPE_SATURATING (t) ? "saturating": "non-saturating");
485 break;
487 case POINTER_TYPE:
488 dump_child ("ptd", TREE_TYPE (t));
489 break;
491 case REFERENCE_TYPE:
492 dump_child ("refd", TREE_TYPE (t));
493 break;
495 case METHOD_TYPE:
496 dump_child ("clas", TYPE_METHOD_BASETYPE (t));
497 /* Fall through. */
499 case FUNCTION_TYPE:
500 dump_child ("retn", TREE_TYPE (t));
501 dump_child ("prms", TYPE_ARG_TYPES (t));
502 break;
504 case ARRAY_TYPE:
505 dump_child ("elts", TREE_TYPE (t));
506 dump_child ("domn", TYPE_DOMAIN (t));
507 break;
509 case RECORD_TYPE:
510 case UNION_TYPE:
511 if (TREE_CODE (t) == RECORD_TYPE)
512 dump_string_field (di, "tag", "struct");
513 else
514 dump_string_field (di, "tag", "union");
516 dump_child ("flds", TYPE_FIELDS (t));
517 dump_child ("fncs", TYPE_METHODS (t));
518 queue_and_dump_index (di, "binf", TYPE_BINFO (t),
519 DUMP_BINFO);
520 break;
522 case CONST_DECL:
523 dump_child ("cnst", DECL_INITIAL (t));
524 break;
526 case DEBUG_EXPR_DECL:
527 dump_int (di, "-uid", DEBUG_TEMP_UID (t));
528 /* Fall through. */
530 case VAR_DECL:
531 case PARM_DECL:
532 case FIELD_DECL:
533 case RESULT_DECL:
534 if (TREE_CODE (t) == PARM_DECL)
535 dump_child ("argt", DECL_ARG_TYPE (t));
536 else
537 dump_child ("init", DECL_INITIAL (t));
538 dump_child ("size", DECL_SIZE (t));
539 dump_int (di, "algn", DECL_ALIGN (t));
541 if (TREE_CODE (t) == FIELD_DECL)
543 if (DECL_FIELD_OFFSET (t))
544 dump_child ("bpos", bit_position (t));
546 else if (TREE_CODE (t) == VAR_DECL
547 || TREE_CODE (t) == PARM_DECL)
549 dump_int (di, "used", TREE_USED (t));
550 if (DECL_REGISTER (t))
551 dump_string_field (di, "spec", "register");
553 break;
555 case FUNCTION_DECL:
556 dump_child ("args", DECL_ARGUMENTS (t));
557 if (DECL_EXTERNAL (t))
558 dump_string_field (di, "body", "undefined");
559 if (TREE_PUBLIC (t))
560 dump_string_field (di, "link", "extern");
561 else
562 dump_string_field (di, "link", "static");
563 if (DECL_SAVED_TREE (t) && !dump_flag (di, TDF_SLIM, t))
564 dump_child ("body", DECL_SAVED_TREE (t));
565 break;
567 case INTEGER_CST:
568 fprintf (di->stream, "int: ");
569 print_decs (t, di->stream);
570 break;
572 case STRING_CST:
573 fprintf (di->stream, "strg: %-7s ", TREE_STRING_POINTER (t));
574 dump_int (di, "lngt", TREE_STRING_LENGTH (t));
575 break;
577 case REAL_CST:
578 dump_real (di, "valu", TREE_REAL_CST_PTR (t));
579 break;
581 case FIXED_CST:
582 dump_fixed (di, "valu", TREE_FIXED_CST_PTR (t));
583 break;
585 case TRUTH_NOT_EXPR:
586 case ADDR_EXPR:
587 case INDIRECT_REF:
588 case CLEANUP_POINT_EXPR:
589 case SAVE_EXPR:
590 case REALPART_EXPR:
591 case IMAGPART_EXPR:
592 /* These nodes are unary, but do not have code class `1'. */
593 dump_child ("op 0", TREE_OPERAND (t, 0));
594 break;
596 case TRUTH_ANDIF_EXPR:
597 case TRUTH_ORIF_EXPR:
598 case INIT_EXPR:
599 case MODIFY_EXPR:
600 case COMPOUND_EXPR:
601 case PREDECREMENT_EXPR:
602 case PREINCREMENT_EXPR:
603 case POSTDECREMENT_EXPR:
604 case POSTINCREMENT_EXPR:
605 /* These nodes are binary, but do not have code class `2'. */
606 dump_child ("op 0", TREE_OPERAND (t, 0));
607 dump_child ("op 1", TREE_OPERAND (t, 1));
608 break;
610 case COMPONENT_REF:
611 case BIT_FIELD_REF:
612 dump_child ("op 0", TREE_OPERAND (t, 0));
613 dump_child ("op 1", TREE_OPERAND (t, 1));
614 dump_child ("op 2", TREE_OPERAND (t, 2));
615 break;
617 case ARRAY_REF:
618 case ARRAY_RANGE_REF:
619 dump_child ("op 0", TREE_OPERAND (t, 0));
620 dump_child ("op 1", TREE_OPERAND (t, 1));
621 dump_child ("op 2", TREE_OPERAND (t, 2));
622 dump_child ("op 3", TREE_OPERAND (t, 3));
623 break;
625 case COND_EXPR:
626 dump_child ("op 0", TREE_OPERAND (t, 0));
627 dump_child ("op 1", TREE_OPERAND (t, 1));
628 dump_child ("op 2", TREE_OPERAND (t, 2));
629 break;
631 case TRY_FINALLY_EXPR:
632 dump_child ("op 0", TREE_OPERAND (t, 0));
633 dump_child ("op 1", TREE_OPERAND (t, 1));
634 break;
636 case CALL_EXPR:
638 int i = 0;
639 tree arg;
640 call_expr_arg_iterator iter;
641 dump_child ("fn", CALL_EXPR_FN (t));
642 FOR_EACH_CALL_EXPR_ARG (arg, iter, t)
644 char buffer[32];
645 sprintf (buffer, "%u", i);
646 dump_child (buffer, arg);
647 i++;
650 break;
652 case CONSTRUCTOR:
654 unsigned HOST_WIDE_INT cnt;
655 tree index, value;
656 dump_int (di, "lngt", vec_safe_length (CONSTRUCTOR_ELTS (t)));
657 FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (t), cnt, index, value)
659 dump_child ("idx", index);
660 dump_child ("val", value);
663 break;
665 case BIND_EXPR:
666 dump_child ("vars", TREE_OPERAND (t, 0));
667 dump_child ("body", TREE_OPERAND (t, 1));
668 break;
670 case LOOP_EXPR:
671 dump_child ("body", TREE_OPERAND (t, 0));
672 break;
674 case EXIT_EXPR:
675 dump_child ("cond", TREE_OPERAND (t, 0));
676 break;
678 case RETURN_EXPR:
679 dump_child ("expr", TREE_OPERAND (t, 0));
680 break;
682 case TARGET_EXPR:
683 dump_child ("decl", TREE_OPERAND (t, 0));
684 dump_child ("init", TREE_OPERAND (t, 1));
685 dump_child ("clnp", TREE_OPERAND (t, 2));
686 /* There really are two possible places the initializer can be.
687 After RTL expansion, the second operand is moved to the
688 position of the fourth operand, and the second operand
689 becomes NULL. */
690 dump_child ("init", TREE_OPERAND (t, 3));
691 break;
693 case CASE_LABEL_EXPR:
694 dump_child ("name", CASE_LABEL (t));
695 if (CASE_LOW (t))
697 dump_child ("low ", CASE_LOW (t));
698 if (CASE_HIGH (t))
699 dump_child ("high", CASE_HIGH (t));
701 break;
702 case LABEL_EXPR:
703 dump_child ("name", TREE_OPERAND (t,0));
704 break;
705 case GOTO_EXPR:
706 dump_child ("labl", TREE_OPERAND (t, 0));
707 break;
708 case SWITCH_EXPR:
709 dump_child ("cond", TREE_OPERAND (t, 0));
710 dump_child ("body", TREE_OPERAND (t, 1));
711 if (TREE_OPERAND (t, 2))
713 dump_child ("labl", TREE_OPERAND (t,2));
715 break;
716 case OMP_CLAUSE:
718 int i;
719 fprintf (di->stream, "%s\n", omp_clause_code_name[OMP_CLAUSE_CODE (t)]);
720 for (i = 0; i < omp_clause_num_ops[OMP_CLAUSE_CODE (t)]; i++)
721 dump_child ("op: ", OMP_CLAUSE_OPERAND (t, i));
723 break;
724 default:
725 /* There are no additional fields to print. */
726 break;
729 done:
730 if (dump_flag (di, TDF_ADDRESS, NULL))
731 dump_pointer (di, "addr", (void *)t);
733 /* Terminate the line. */
734 fprintf (di->stream, "\n");
737 /* Return nonzero if FLAG has been specified for the dump, and NODE
738 is not the root node of the dump. */
740 int dump_flag (dump_info_p di, int flag, const_tree node)
742 return (di->flags & flag) && (node != di->node);
745 /* Dump T, and all its children, on STREAM. */
747 void
748 dump_node (const_tree t, int flags, FILE *stream)
750 struct dump_info di;
751 dump_queue_p dq;
752 dump_queue_p next_dq;
754 /* Initialize the dump-information structure. */
755 di.stream = stream;
756 di.index = 0;
757 di.column = 0;
758 di.queue = 0;
759 di.queue_end = 0;
760 di.free_list = 0;
761 di.flags = flags;
762 di.node = t;
763 di.nodes = splay_tree_new (splay_tree_compare_pointers, 0,
764 (splay_tree_delete_value_fn) &free);
766 /* Queue up the first node. */
767 queue (&di, t, DUMP_NONE);
769 /* Until the queue is empty, keep dumping nodes. */
770 while (di.queue)
771 dequeue_and_dump (&di);
773 /* Now, clean up. */
774 for (dq = di.free_list; dq; dq = next_dq)
776 next_dq = dq->next;
777 free (dq);
779 splay_tree_delete (di.nodes);