aboutsummaryrefslogtreecommitdiff
path: root/gcc/print-tree.c
diff options
context:
space:
mode:
authorKenneth Zadeck <zadeck@naturalbridge.com>2008-05-16 13:34:34 +0000
committerDiego Novillo <dnovillo@gcc.gnu.org>2008-05-16 09:34:34 -0400
commit3e894af1569a84c5bb6eb730266248e6a4cae2de (patch)
tree41e1ad4097935bc77cbf6d58f2b8d967d25d101f /gcc/print-tree.c
parent4fc4d8507ed500b25bf558875b1c011ce36e4647 (diff)
downloadgcc-3e894af1569a84c5bb6eb730266248e6a4cae2de.zip
gcc-3e894af1569a84c5bb6eb730266248e6a4cae2de.tar.gz
gcc-3e894af1569a84c5bb6eb730266248e6a4cae2de.tar.bz2
invoke.text (-fdump-tree-*-verbose): New option.
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. From-SVN: r135417
Diffstat (limited to 'gcc/print-tree.c')
-rw-r--r--gcc/print-tree.c41
1 files changed, 26 insertions, 15 deletions
diff --git a/gcc/print-tree.c b/gcc/print-tree.c
index 4745491..3b34f89 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;