diff options
author | Andrew Pinski <andrew_pinski@playstation.sony.com> | 2007-04-21 20:40:31 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2007-04-21 13:40:31 -0700 |
commit | 3d95caa4af11b8aff1745cbe5eab585f5a724c40 (patch) | |
tree | dbb4d8edec51cb4096434d4452385f35a0ef5846 /gcc/tree.h | |
parent | 84ece8efd21ed73d98de62e4bcf22b4160cd7faa (diff) | |
download | gcc-3d95caa4af11b8aff1745cbe5eab585f5a724c40.zip gcc-3d95caa4af11b8aff1745cbe5eab585f5a724c40.tar.gz gcc-3d95caa4af11b8aff1745cbe5eab585f5a724c40.tar.bz2 |
tree.h (GIMPLE_TUPLE_P): Also true for PHI_NODEs.
2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
* tree.h (GIMPLE_TUPLE_P): Also true for PHI_NODEs.
(GENERIC_NEXT): New function macro.
(PHI_CHAIN): Use phi_node's new chain variable.
(tree_phi_node): Change tree_common to tree_base
and add the chain field.
* tree-phinodes.c (make_phi_node): Don't set
TREE_TYPE on the new node.
* c-decl.c (lang_tree_node): Use GENERIC_NEXT
instead of checking GIMPLE_TUPLE_P in chain_next.
* tree-vect-transform.c
(get_initial_def_for_induction): Look at
PHI_RESULT_TREE for the type of the phi node.
(update_vuses_to_preheader): Use PHI_CHAIN
instead of TREE_CHAIN on the phi node.
* tree-ssa-structalias.c (compute_points_to_sets):
Likewise.
(ipa_pta_execute): Likewise.
2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
* cp-tree.h (lang_tree_node): Use GENERIC_NEXT
instead of checking GIMPLE_STMT_P in chain_next.
2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
* ada-tree.h (lang_tree_node): Use GENERIC_NEXT
instead of checking GIMPLE_STMT_P in chain_next.
2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
* f95-lang.c (lang_tree_node): Use GENERIC_NEXT
instead of checking GIMPLE_STMT_P in chain_next.
2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
* java-tree.h (lang_tree_node): Use GENERIC_NEXT
instead of checking GIMPLE_STMT_P in chain_next.
From-SVN: r124021
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -951,7 +951,7 @@ extern void omp_clause_range_check_failed (const tree, const char *, int, (TREE_CODE_CLASS (TREE_CODE ((NODE))) == tcc_gimple_stmt) /* Nonzero if NODE is a GIMPLE tuple. */ -#define GIMPLE_TUPLE_P(NODE) (GIMPLE_STMT_P (NODE)) +#define GIMPLE_TUPLE_P(NODE) (GIMPLE_STMT_P (NODE) || TREE_CODE (NODE) == PHI_NODE) /* A GIMPLE tuple that has a ``locus'' field. */ #define GIMPLE_TUPLE_HAS_LOCUS_P(NODE) GIMPLE_STMT_P ((NODE)) @@ -975,6 +975,11 @@ extern void omp_clause_range_check_failed (const tree, const char *, int, used in hash tables which are saved to a PCH. */ #define TREE_HASH(NODE) ((size_t) (NODE) & 0777777) +/* The TREE_CHAIN but it is able to handle tuples. */ +#define GENERIC_NEXT(NODE) \ + (TREE_CODE (NODE) == PHI_NODE ? PHI_CHAIN (NODE) : \ + GIMPLE_STMT_P (NODE) ? NULL_TREE : TREE_CHAIN (NODE)) + /* Given an expression as a tree, strip any NON_LVALUE_EXPRs and NOP_EXPRs that don't change the machine mode. */ @@ -1866,7 +1871,7 @@ struct tree_ssa_name GTY(()) /* PHI_NODEs for each basic block are chained together in a single linked list. The head of the list is linked from the block annotation, and the link to the next PHI is in PHI_CHAIN. */ -#define PHI_CHAIN(NODE) TREE_CHAIN (PHI_NODE_CHECK (NODE)) +#define PHI_CHAIN(NODE) PHI_NODE_CHECK (NODE)->phi.chain #define PHI_NUM_ARGS(NODE) PHI_NODE_CHECK (NODE)->phi.num_args #define PHI_ARG_CAPACITY(NODE) PHI_NODE_CHECK (NODE)->phi.capacity @@ -1885,7 +1890,8 @@ struct phi_arg_d GTY(()) struct tree_phi_node GTY(()) { - struct tree_common common; + struct tree_base common; + tree chain; tree result; int num_args; int capacity; |