tree-dump.h

Go to the documentation of this file.
00001 /* Tree-dumping functionality for intermediate representation.
00002    Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
00003    Written by Mark Mitchell <mark@codesourcery.com>
00004 
00005 This file is part of GCC.
00006 
00007 GCC is free software; you can redistribute it and/or modify it under
00008 the terms of the GNU General Public License as published by the Free
00009 Software Foundation; either version 2, or (at your option) any later
00010 version.
00011 
00012 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
00013 WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00015 for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with GCC; see the file COPYING.  If not, write to the Free
00019 Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
00020 02110-1301, USA.  */
00021 
00022 #ifndef GCC_TREE_DUMP_H
00023 #define GCC_TREE_DUMP_H
00024 
00025 #include "splay-tree.h"
00026 #include "tree-pass.h"
00027 
00028 typedef struct dump_info *dump_info_p;
00029 
00030 /* Flags used with queue functions.  */
00031 #define DUMP_NONE     0
00032 #define DUMP_BINFO    1
00033 
00034 /* Information about a node to be dumped.  */
00035 
00036 typedef struct dump_node_info
00037 {
00038   /* The index for the node.  */
00039   unsigned int index;
00040   /* Nonzero if the node is a binfo.  */
00041   unsigned int binfo_p : 1;
00042 } *dump_node_info_p;
00043 
00044 /* A dump_queue is a link in the queue of things to be dumped.  */
00045 
00046 typedef struct dump_queue
00047 {
00048   /* The queued tree node.  */
00049   splay_tree_node node;
00050   /* The next node in the queue.  */
00051   struct dump_queue *next;
00052 } *dump_queue_p;
00053 
00054 /* A dump_info gives information about how we should perform the dump
00055    and about the current state of the dump.  */
00056 
00057 struct dump_info
00058 {
00059   /* The stream on which to dump the information.  */
00060   FILE *stream;
00061   /* The original node.  */
00062   tree node;
00063   /* User flags.  */
00064   int flags;
00065   /* The next unused node index.  */
00066   unsigned int index;
00067   /* The next column.  */
00068   unsigned int column;
00069   /* The first node in the queue of nodes to be written out.  */
00070   dump_queue_p queue;
00071   /* The last node in the queue.  */
00072   dump_queue_p queue_end;
00073   /* Free queue nodes.  */
00074   dump_queue_p free_list;
00075   /* The tree nodes which we have already written out.  The
00076      keys are the addresses of the nodes; the values are the integer
00077      indices we assigned them.  */
00078   splay_tree nodes;
00079 };
00080 
00081 /* Dump the CHILD and its children.  */
00082 #define dump_child(field, child) \
00083   queue_and_dump_index (di, field, child, DUMP_NONE)
00084 
00085 extern void dump_pointer (dump_info_p, const char *, void *);
00086 extern void dump_int (dump_info_p, const char *, int);
00087 extern void dump_string (dump_info_p, const char *);
00088 extern void dump_string_field (dump_info_p, const char *, const char *);
00089 extern void dump_stmt (dump_info_p, tree);
00090 extern void queue_and_dump_index (dump_info_p, const char *, tree, int);
00091 extern void queue_and_dump_type (dump_info_p, tree);
00092 extern void dump_function (enum tree_dump_index, tree);
00093 extern void dump_function_to_file (tree, FILE *, int);
00094 extern void debug_function (tree, int);
00095 extern int dump_flag (dump_info_p, int, tree);
00096 
00097 extern unsigned int dump_register (const char *, const char *, const char *, 
00098                                    int, int);
00099 
00100 
00101 #endif /* ! GCC_TREE_DUMP_H */

Generated on Sun Sep 17 18:03:28 2006 for Tree SSA by  doxygen 1.4.6