summaryrefslogtreecommitdiff
path: root/gcc/print-tree.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-17 05:56:15 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-17 05:56:15 +0000
commitf259ef2dde37cdc1994ab89de4202de11db1758d (patch)
treefa16d409fa166f36caaced4b9b18b5c11655a10f /gcc/print-tree.c
parentf901aa342fec3c1daf7be7c1f6258571542389b1 (diff)
downloadgcc-f259ef2dde37cdc1994ab89de4202de11db1758d.tar.gz
2008-05-17 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r135459 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@135460 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/print-tree.c')
-rw-r--r--gcc/print-tree.c50
1 files changed, 26 insertions, 24 deletions
diff --git a/gcc/print-tree.c b/gcc/print-tree.c
index a6cb7b23760..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);
@@ -534,15 +539,6 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
&& DECL_HAS_VALUE_EXPR_P (node))
print_node (file, "value-expr", DECL_VALUE_EXPR (node), indent + 4);
- if (TREE_CODE (node) == STRUCT_FIELD_TAG)
- {
- fprintf (file, " sft size " HOST_WIDE_INT_PRINT_DEC,
- SFT_SIZE (node));
- fprintf (file, " sft offset " HOST_WIDE_INT_PRINT_DEC,
- SFT_OFFSET (node));
- print_node_brief (file, "parent var", SFT_PARENT_VAR (node),
- indent + 4);
- }
/* Print the decl chain only if decl is at second level. */
if (indent == 4)
print_node (file, "chain", TREE_CHAIN (node), indent + 4);
@@ -915,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;