diff options
author | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-16 13:34:34 +0000 |
---|---|---|
committer | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-16 13:34:34 +0000 |
commit | 46412a373a530ead8448abe35705577d223ff1a5 (patch) | |
tree | 41e1ad4097935bc77cbf6d58f2b8d967d25d101f /gcc/print-tree.c | |
parent | d4cae31e732f51391c2b50e03828e2466db06a2d (diff) | |
download | gcc-46412a373a530ead8448abe35705577d223ff1a5.tar.gz |
2008-05-16 Kenneth Zadeck <zadeck@naturalbridge.com>
* doc/invoke.text (-fdump-tree-*-verbose): New option.
* tree-dump.c (dump_options): New verbose option.
* tree-pretty-print.c (dump_phi_nodes, dump_generic_bb_buff):
Add verbose dump.
* tree-pass.h (TDF_VERBOSE): New dump flag.
* print-tree.c (print_node): Added code to be able to print
PHI_NODES.
(tree-flow.h): Added include.
Makefile.in (print-tree.o): Added TREE_FLOW_H.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135417 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/print-tree.c')
-rw-r--r-- | gcc/print-tree.c | 41 |
1 files changed, 26 insertions, 15 deletions
diff --git a/gcc/print-tree.c b/gcc/print-tree.c index 4745491de56..3b34f89d41c 100644 --- a/gcc/print-tree.c +++ b/gcc/print-tree.c @@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see #include "ggc.h" #include "langhooks.h" #include "tree-iterator.h" +#include "tree-flow.h" /* Define the hash table of nodes already seen. Such nodes are not repeated; brief cross-references are used. */ @@ -221,21 +222,25 @@ print_node (FILE *file, const char *prefix, tree node, int indent) return; } - hash = ((unsigned long) node) % HASH_SIZE; - - /* If node is in the table, just mention its address. */ - for (b = table[hash]; b; b = b->next) - if (b->node == node) - { - print_node_brief (file, prefix, node, indent); - return; - } - - /* Add this node to the table. */ - b = XNEW (struct bucket); - b->node = node; - b->next = table[hash]; - table[hash] = b; + /* Allow this function to be called if the table is not there. */ + if (table) + { + hash = ((unsigned long) node) % HASH_SIZE; + + /* If node is in the table, just mention its address. */ + for (b = table[hash]; b; b = b->next) + if (b->node == node) + { + print_node_brief (file, prefix, node, indent); + return; + } + + /* Add this node to the table. */ + b = XNEW (struct bucket); + b->node = node; + b->next = table[hash]; + table[hash] = b; + } /* Indent to the specified column, since this is the long form. */ indent_to (file, indent); @@ -906,6 +911,12 @@ print_node (FILE *file, const char *prefix, tree node, int indent) } break; + case PHI_NODE: + print_node (file, "result", PHI_RESULT (node), indent + 4); + for (i = 0; i < PHI_NUM_ARGS (node); i++) + print_node (file, "arg", PHI_ARG_DEF (node, i), indent + 4); + break; + case OMP_CLAUSE: { int i; |