Daily bump.
[official-gcc.git] / gcc / tree-dump.h
blobffe3de11c14369b8058af918cd34d6df93bfac48
1 /* Tree-dumping functionality for intermediate representation.
2 Copyright (C) 1999, 2000, 2003, 2004, 2005 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 2, 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 COPYING. If not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA. */
22 #ifndef GCC_TREE_DUMP_H
23 #define GCC_TREE_DUMP_H
25 #include "splay-tree.h"
27 /* Flags used with queue functions. */
28 #define DUMP_NONE 0
29 #define DUMP_BINFO 1
31 /* Information about a node to be dumped. */
33 typedef struct dump_node_info
35 /* The index for the node. */
36 unsigned int index;
37 /* Nonzero if the node is a binfo. */
38 unsigned int binfo_p : 1;
39 } *dump_node_info_p;
41 /* A dump_queue is a link in the queue of things to be dumped. */
43 typedef struct dump_queue
45 /* The queued tree node. */
46 splay_tree_node node;
47 /* The next node in the queue. */
48 struct dump_queue *next;
49 } *dump_queue_p;
51 /* A dump_info gives information about how we should perform the dump
52 and about the current state of the dump. */
54 struct dump_info
56 /* The stream on which to dump the information. */
57 FILE *stream;
58 /* The original node. */
59 tree node;
60 /* User flags. */
61 int flags;
62 /* The next unused node index. */
63 unsigned int index;
64 /* The next column. */
65 unsigned int column;
66 /* The first node in the queue of nodes to be written out. */
67 dump_queue_p queue;
68 /* The last node in the queue. */
69 dump_queue_p queue_end;
70 /* Free queue nodes. */
71 dump_queue_p free_list;
72 /* The tree nodes which we have already written out. The
73 keys are the addresses of the nodes; the values are the integer
74 indices we assigned them. */
75 splay_tree nodes;
78 /* Dump the CHILD and its children. */
79 #define dump_child(field, child) \
80 queue_and_dump_index (di, field, child, DUMP_NONE)
82 extern void dump_pointer (dump_info_p, const char *, void *);
83 extern void dump_int (dump_info_p, const char *, int);
84 extern void dump_string (dump_info_p, const char *);
85 extern void dump_stmt (dump_info_p, tree);
86 extern void queue_and_dump_index (dump_info_p, const char *, tree, int);
87 extern void queue_and_dump_type (dump_info_p, tree);
88 extern void dump_function (enum tree_dump_index, tree);
89 extern void dump_function_to_file (tree, FILE *, int);
91 extern unsigned int dump_register (const char *, const char *, const char *,
92 int, unsigned int, int);
94 #endif /* ! GCC_TREE_DUMP_H */