This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] tree-*.c: Replace TREE_CHAIN with PHI_CHAIN whereappropriate.


Hi,

Tested on i686-pc-linux-gnu.  Committed as obvious.

Kazu Hirata

2004-11-14  Kazu Hirata  <kazu@cs.umass.edu>

	* tree-cfg.c, tree-if-conv.c, tree-ssa-loop-ivopts.c,
	tree-ssa-loop-manip.c, tree-vectorizer.c: Replace TREE_CHAIN
	with PHI_CHAIN where appropriate.

Index: tree-cfg.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-cfg.c,v
retrieving revision 2.106
diff -u -d -p -r2.106 tree-cfg.c
--- tree-cfg.c	13 Nov 2004 04:18:49 -0000	2.106
+++ tree-cfg.c	13 Nov 2004 19:44:00 -0000
@@ -4515,9 +4515,9 @@ add_phi_args_after_copy_bb (basic_block 
 
       for (phi = phi_nodes (e->dest), phi_copy = phi_nodes (e_copy->dest);
 	   phi;
-	   phi = phi_next, phi_copy = TREE_CHAIN (phi_copy))
+	   phi = phi_next, phi_copy = PHI_CHAIN (phi_copy))
 	{
-	  phi_next = TREE_CHAIN (phi);
+	  phi_next = PHI_CHAIN (phi);
 
 	  gcc_assert (PHI_RESULT (phi) == PHI_RESULT (phi_copy));
 	  def = PHI_ARG_DEF_FROM_EDGE (phi, e);
Index: tree-if-conv.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-if-conv.c,v
retrieving revision 2.16
diff -u -d -p -r2.16 tree-if-conv.c
--- tree-if-conv.c	13 Nov 2004 01:06:39 -0000	2.16
+++ tree-if-conv.c	13 Nov 2004 19:44:01 -0000
@@ -824,7 +824,7 @@ process_phi_nodes (struct loop *loop)
 
       while (phi)
 	{
-	  tree next = TREE_CHAIN (phi);
+	  tree next = PHI_CHAIN (phi);
 	  replace_phi_with_cond_modify_expr (phi, cond, true_bb, &bsi);
 	  release_phi_node (phi);
 	  phi = next;
Index: tree-ssa-loop-ivopts.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-loop-ivopts.c,v
retrieving revision 2.28
diff -u -d -p -r2.28 tree-ssa-loop-ivopts.c
--- tree-ssa-loop-ivopts.c	10 Nov 2004 20:49:55 -0000	2.28
+++ tree-ssa-loop-ivopts.c	13 Nov 2004 19:44:05 -0000
@@ -4659,7 +4659,7 @@ compute_phi_arg_on_exit (edge exit, tree
 
   for (phi = phi_nodes (exit->dest); phi; phi = next)
     {
-      next = TREE_CHAIN (phi);
+      next = PHI_CHAIN (phi);
 
       if (PHI_ARG_DEF_FROM_EDGE (phi, exit) == op)
 	{
Index: tree-ssa-loop-manip.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-loop-manip.c,v
retrieving revision 2.16
diff -u -d -p -r2.16 tree-ssa-loop-manip.c
--- tree-ssa-loop-manip.c	13 Nov 2004 07:13:48 -0000	2.16
+++ tree-ssa-loop-manip.c	13 Nov 2004 19:44:06 -0000
@@ -665,7 +665,7 @@ lv_adjust_loop_header_phi (basic_block f
 
   for (phi2 = phi_nodes (second), phi1 = phi_nodes (first); 
        phi2 && phi1; 
-       phi2 = TREE_CHAIN (phi2),  phi1 = TREE_CHAIN (phi1))
+       phi2 = PHI_CHAIN (phi2),  phi1 = PHI_CHAIN (phi1))
     {
       int i;
       for (i = 0; i < PHI_NUM_ARGS (phi2); i++)
Index: tree-vectorizer.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-vectorizer.c,v
retrieving revision 2.27
diff -u -d -p -r2.27 tree-vectorizer.c
--- tree-vectorizer.c	12 Nov 2004 15:15:50 -0000	2.27
+++ tree-vectorizer.c	13 Nov 2004 19:44:11 -0000
@@ -482,7 +482,7 @@ update_phis_for_duplicate_loop (struct l
   for (phi_new = phi_nodes (new_loop->header),
        phi_old = phi_nodes (loop->header);
        phi_new && phi_old;
-       phi_new = TREE_CHAIN (phi_new), phi_old = TREE_CHAIN (phi_old))
+       phi_new = PHI_CHAIN (phi_new), phi_old = PHI_CHAIN (phi_old))
     {
       def = PHI_ARG_DEF_FROM_EDGE (phi_old, old_latch);
 
@@ -577,7 +577,7 @@ update_phi_nodes_for_guard (edge guard_t
 	/* Update all phi nodes at the loop exit successor.  */
 	for (phi1 = phi_nodes (EDGE_SUCC (bb, 0)->dest); 
 	     phi1; 
-	     phi1 = TREE_CHAIN (phi1))
+	     phi1 = PHI_CHAIN (phi1))
 	  {
 	    tree old_arg = PHI_ARG_DEF_FROM_EDGE (phi1, EDGE_SUCC (bb, 0));
 	    if (old_arg == phi_arg)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]