This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
small tree-dump addition
- From: Richard Henderson <rth at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 21 May 2004 12:51:24 -0700
- Subject: small tree-dump addition
* Makefile.in (tree-dump.o): Depend on tree-iterator.h.
* tree-dump.c (dequeue_and_dump): Dump STATEMENT_LISTs.
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.1280
diff -u -p -r1.1280 Makefile.in
--- Makefile.in 20 May 2004 20:17:03 -0000 1.1280
+++ Makefile.in 21 May 2004 19:49:17 -0000
@@ -1538,8 +1538,8 @@ tree.o : tree.c $(CONFIG_H) $(SYSTEM_H)
toplev.h $(GGC_H) $(HASHTAB_H) $(TARGET_H) output.h $(TM_P_H) langhooks.h \
real.h gt-tree.h tree-iterator.h $(BASIC_BLOCK_H) $(TREE_FLOW_H)
tree-dump.o: tree-dump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
- $(C_TREE_H) flags.h langhooks.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \
- $(EXPR_H) $(SPLAY_TREE_H) $(TREE_DUMP_H)
+ $(C_TREE_H) flags.h langhooks.h toplev.h output.h c-pragma.h $(RTL_H) \
+ $(GGC_H) $(EXPR_H) $(SPLAY_TREE_H) $(TREE_DUMP_H) tree-iterator.h
tree-inline.o : tree-inline.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(RTL_H) $(EXPR_H) flags.h $(PARAMS_H) input.h insn-config.h \
$(INTEGRATE_H) $(VARRAY_H) $(HASHTAB_H) $(SPLAY_TREE_H) toplev.h \
Index: tree-dump.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-dump.c,v
retrieving revision 1.21
diff -u -p -r1.21 tree-dump.c
--- tree-dump.c 13 May 2004 06:39:48 -0000 1.21
+++ tree-dump.c 21 May 2004 19:49:17 -0000
@@ -29,6 +29,7 @@ Software Foundation, 59 Temple Place - S
#include "toplev.h"
#include "tree-dump.h"
#include "langhooks.h"
+#include "tree-iterator.h"
static unsigned int queue (dump_info_p, tree, int);
static void dump_index (dump_info_p, unsigned int);
@@ -395,6 +396,18 @@ dequeue_and_dump (dump_info_p di)
dump_child ("purp", TREE_PURPOSE (t));
dump_child ("valu", TREE_VALUE (t));
dump_child ("chan", TREE_CHAIN (t));
+ break;
+
+ case STATEMENT_LIST:
+ {
+ tree_stmt_iterator it;
+ for (i = 0, it = tsi_start (t); !tsi_end_p (it); tsi_next (&it), i++)
+ {
+ char buffer[32];
+ sprintf (buffer, "%u", i);
+ dump_child (buffer, tsi_stmt (it));
+ }
+ }
break;
case TREE_VEC: