summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-21 20:40:31 +0000
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-21 20:40:31 +0000
commit98d4f925caa14e46516a6ee9f00db93862634b08 (patch)
treedbb4d8edec51cb4096434d4452385f35a0ef5846 /gcc
parent7a6537b3aa82749c85a64504e28d3dccb6dae2fe (diff)
downloadgcc-98d4f925caa14e46516a6ee9f00db93862634b08.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124021 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog20
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/ada-tree.h2
-rw-r--r--gcc/c-decl.c2
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/cp-tree.h2
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/f95-lang.c2
-rw-r--r--gcc/java/ChangeLog5
-rw-r--r--gcc/java/java-tree.h2
-rw-r--r--gcc/tree-phinodes.c1
-rw-r--r--gcc/tree-ssa-structalias.c4
-rw-r--r--gcc/tree-vect-transform.c4
-rw-r--r--gcc/tree.h12
14 files changed, 58 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 034936d2105..fe2dbaa4e98 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,23 @@
+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 Richard Guenther <rguenther@suse.de>
PR middle-end/31136
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 1107832355a..eab77158aba 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,8 @@
+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-17 Andreas Krebbel <krebbel1@de.ibm.com>
PR ada/31576
diff --git a/gcc/ada/ada-tree.h b/gcc/ada/ada-tree.h
index 608f75e9df2..358cecafac8 100644
--- a/gcc/ada/ada-tree.h
+++ b/gcc/ada/ada-tree.h
@@ -36,7 +36,7 @@ enum gnat_tree_code {
/* Ada uses the lang_decl and lang_type fields to hold a tree. */
union lang_tree_node
GTY((desc ("0"),
- chain_next ("(GIMPLE_STMT_P (&%h.t) ? (union lang_tree_node *) 0 : (union lang_tree_node *)TREE_CHAIN (&%h.t))")))
+ chain_next ("(union lang_tree_node *)GENERIC_NEXT (&%h.generic)")))
{
union tree_node GTY((tag ("0"))) t;
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 5839fc2e84e..3af18571794 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -250,7 +250,7 @@ extern char C_SIZEOF_STRUCT_LANG_IDENTIFIER_isnt_accurate
union lang_tree_node
GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"),
- chain_next ("TREE_CODE (&%h.generic) == INTEGER_TYPE ? (union lang_tree_node *) TYPE_NEXT_VARIANT (&%h.generic) : (GIMPLE_TUPLE_P (&%h.generic) ? (union lang_tree_node *) 0 : (union lang_tree_node *) TREE_CHAIN (&%h.generic))")))
+ chain_next ("TREE_CODE (&%h.generic) == INTEGER_TYPE ? (union lang_tree_node *) TYPE_NEXT_VARIANT (&%h.generic) : ((union lang_tree_node *) GENERIC_NEXT (&%h.generic))")))
{
union tree_node GTY ((tag ("0"),
desc ("tree_node_structure (&%h)")))
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 8aad37a5f9a..326ed7025eb 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+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-17 Mark Mitchell <mark@codesourcery.com>
PR c++/31513
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index e4e847328f3..27f5b8caf89 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -539,7 +539,7 @@ enum cp_tree_node_structure_enum {
/* The resulting tree type. */
union lang_tree_node GTY((desc ("cp_tree_node_structure (&%h)"),
- chain_next ("(GIMPLE_STMT_P (&%h.generic) ? (union lang_tree_node *) 0 : (union lang_tree_node *)TREE_CHAIN (&%h.generic))")))
+ chain_next ("(union lang_tree_node *)GENERIC_NEXT (&%h.generic)")))
{
union tree_node GTY ((tag ("TS_CP_GENERIC"),
desc ("tree_node_structure (&%h)"))) generic;
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 34488b59a4f..a02a381ecdd 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,8 @@
+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-17 Tobias Schlüter <tobi@gcc.gnu.org>
* trans-types.h (gfc_packed): New enum.
diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c
index c498398dd5d..4995e4c5432 100644
--- a/gcc/fortran/f95-lang.c
+++ b/gcc/fortran/f95-lang.c
@@ -62,7 +62,7 @@ GTY(())
union lang_tree_node
GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"),
- chain_next ("(GIMPLE_STMT_P (&%h.generic) ? (union lang_tree_node *) 0 : (union lang_tree_node *)TREE_CHAIN (&%h.generic))")))
+ chain_next ("(union lang_tree_node *)GENERIC_NEXT (&%h.generic)")))
{
union tree_node GTY((tag ("0"),
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 83c3207a7b0..202ffc33763 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,8 @@
+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.
+
2007-04-06 Colin Walters <walters@redhat.com>
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h
index 00ac1b97e9f..d560deeaeda 100644
--- a/gcc/java/java-tree.h
+++ b/gcc/java/java-tree.h
@@ -667,7 +667,7 @@ struct lang_identifier GTY(())
/* The resulting tree type. */
union lang_tree_node
GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"),
- chain_next ("(GIMPLE_STMT_P (&%h.generic) ? (union lang_tree_node *) 0 : (union lang_tree_node *)TREE_CHAIN (&%h.generic))")))
+ chain_next ("(union lang_tree_node *)GENERIC_NEXT (&%h.generic)")))
{
union tree_node GTY ((tag ("0"),
diff --git a/gcc/tree-phinodes.c b/gcc/tree-phinodes.c
index 344770e700a..a758db9afb0 100644
--- a/gcc/tree-phinodes.c
+++ b/gcc/tree-phinodes.c
@@ -218,7 +218,6 @@ make_phi_node (tree var, int len)
TREE_SET_CODE (phi, PHI_NODE);
PHI_NUM_ARGS (phi) = len;
PHI_ARG_CAPACITY (phi) = capacity;
- TREE_TYPE (phi) = TREE_TYPE (var);
if (TREE_CODE (var) == SSA_NAME)
SET_PHI_RESULT (phi, var);
else
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 5c49b525ef3..50ef512209b 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -4793,7 +4793,7 @@ compute_points_to_sets (struct alias_info *ai)
block_stmt_iterator bsi;
tree phi;
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
{
if (is_gimple_reg (PHI_RESULT (phi)))
{
@@ -4946,7 +4946,7 @@ ipa_pta_execute (void)
block_stmt_iterator bsi;
tree phi;
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
{
if (is_gimple_reg (PHI_RESULT (phi)))
{
diff --git a/gcc/tree-vect-transform.c b/gcc/tree-vect-transform.c
index 895e709289c..e5f23a50cb1 100644
--- a/gcc/tree-vect-transform.c
+++ b/gcc/tree-vect-transform.c
@@ -528,7 +528,7 @@ get_initial_def_for_induction (tree iv_phi)
stmt_vec_info stmt_vinfo = vinfo_for_stmt (iv_phi);
loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_vinfo);
struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- tree scalar_type = TREE_TYPE (iv_phi);
+ tree scalar_type = TREE_TYPE (PHI_RESULT_TREE (iv_phi));
tree vectype = get_vectype_for_scalar_type (scalar_type);
int nunits = TYPE_VECTOR_SUBPARTS (vectype);
edge pe = loop_preheader_edge (loop);
@@ -4547,7 +4547,7 @@ update_vuses_to_preheader (tree stmt, struct loop *loop)
tree phi;
bool updated = false;
- for (phi = phi_nodes (header_bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (header_bb); phi; phi = PHI_CHAIN (phi))
{
if (SSA_NAME_VAR (PHI_RESULT (phi)) == name_var)
{
diff --git a/gcc/tree.h b/gcc/tree.h
index 2e19c8f1627..0444ae04c5e 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -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;