X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fprint-tree.c;h=3b34f89d41c1df55b292ede44ff36404d51a808a;hb=9fed75026cca1c2bf8cbf67920c15fe52489d1c9;hp=f7097a415d42e3c9862f427e9e02e4d905817034;hpb=ff3ae3759a5c80c7783090c3a26cee5a29862b34;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/print-tree.c b/gcc/print-tree.c index f7097a415d4..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. */ @@ -127,7 +128,8 @@ print_node_brief (FILE *file, const char *prefix, const_tree node, int indent) -TREE_INT_CST_LOW (node)); else fprintf (file, HOST_WIDE_INT_PRINT_DOUBLE_HEX, - TREE_INT_CST_HIGH (node), TREE_INT_CST_LOW (node)); + (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (node), + (unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (node)); } if (TREE_CODE (node) == REAL_CST) { @@ -220,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); @@ -292,8 +298,6 @@ print_node (FILE *file, const char *prefix, tree node, int indent) else if (TYPE_P (node) && TYPE_SIZES_GIMPLIFIED (node)) fputs (" sizes-gimplified", file); - if (TREE_INVARIANT (node)) - fputs (" invariant", file); if (TREE_ADDRESSABLE (node)) fputs (" addressable", file); if (TREE_THIS_VOLATILE (node)) @@ -535,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); @@ -741,7 +736,8 @@ print_node (FILE *file, const char *prefix, tree node, int indent) -TREE_INT_CST_LOW (node)); else fprintf (file, HOST_WIDE_INT_PRINT_DOUBLE_HEX, - TREE_INT_CST_HIGH (node), TREE_INT_CST_LOW (node)); + (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (node), + (unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (node)); break; case REAL_CST: @@ -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;