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 11/16] tree-parloops.c: use gimple_phi in various places


gcc/
	* tree-parloops.c (struct reduction_info): Strengthen field "new_phi"
	from gimple to gimple_phi.
	(create_phi_for_local_result): Convert local "new_phi" to gimple_phi.
	(loop_has_vector_phi_nodes): Require a gimple_phi rather than a gimple.
	(gather_scalar_reductions): Convert to a gimple_phi_iterator and
	gimple_phi.
	(try_create_reduction_list): Likewise.
---
 gcc/tree-parloops.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c
index a56145d..e4fbab8 100644
--- a/gcc/tree-parloops.c
+++ b/gcc/tree-parloops.c
@@ -197,7 +197,7 @@ struct reduction_info
   tree initial_value;		/* The initial value of the reduction var before entering the loop.  */
   tree field;			/*  the name of the field in the parloop data structure intended for reduction.  */
   tree init;			/* reduction initialization value.  */
-  gimple new_phi;		/* (helper field) Newly created phi node whose result
+  gimple_phi new_phi;		/* (helper field) Newly created phi node whose result
 				   will be passed to the atomic operation.  Represents
 				   the local result each thread computed for the reduction
 				   operation.  */
@@ -1036,7 +1036,7 @@ create_phi_for_local_result (reduction_info **slot, struct loop *loop)
 {
   struct reduction_info *const reduc = *slot;
   edge e;
-  gimple new_phi;
+  gimple_phi new_phi;
   basic_block store_bb;
   tree local_res;
   source_location locus;
@@ -1943,7 +1943,7 @@ loop_has_vector_phi_nodes (struct loop *loop ATTRIBUTE_UNUSED)
 
 static void
 build_new_reduction (reduction_info_table_type reduction_list,
-		     gimple reduc_stmt, gimple phi)
+		     gimple reduc_stmt, gimple_phi phi)
 {
   reduction_info **slot;
   struct reduction_info *new_reduction;
@@ -1983,14 +1983,14 @@ set_reduc_phi_uids (reduction_info **slot, void *data ATTRIBUTE_UNUSED)
 static void
 gather_scalar_reductions (loop_p loop, reduction_info_table_type reduction_list)
 {
-  gimple_stmt_iterator gsi;
+  gimple_phi_iterator gsi;
   loop_vec_info simple_loop_info;
 
   simple_loop_info = vect_analyze_loop_form (loop);
 
   for (gsi = gsi_start_phis (loop->header); !gsi_end_p (gsi); gsi_next (&gsi))
     {
-      gimple phi = gsi_stmt (gsi);
+      gimple_phi phi = gsi.phi ();
       affine_iv iv;
       tree res = PHI_RESULT (phi);
       bool double_reduc;
@@ -2046,7 +2046,7 @@ try_create_reduction_list (loop_p loop,
 			   reduction_info_table_type reduction_list)
 {
   edge exit = single_dom_exit (loop);
-  gimple_stmt_iterator gsi;
+  gimple_phi_iterator gsi;
 
   gcc_assert (exit);
 
@@ -2055,7 +2055,7 @@ try_create_reduction_list (loop_p loop,
 
   for (gsi = gsi_start_phis (exit->dest); !gsi_end_p (gsi); gsi_next (&gsi))
     {
-      gimple phi = gsi_stmt (gsi);
+      gimple_phi phi = gsi.phi ();
       struct reduction_info *red;
       imm_use_iterator imm_iter;
       use_operand_p use_p;
@@ -2113,7 +2113,7 @@ try_create_reduction_list (loop_p loop,
      iteration space can be distributed efficiently.  */
   for (gsi = gsi_start_phis (loop->header); !gsi_end_p (gsi); gsi_next (&gsi))
     {
-      gimple phi = gsi_stmt (gsi);
+      gimple_phi phi = gsi.phi ();
       tree def = PHI_RESULT (phi);
       affine_iv iv;
 
-- 
1.7.11.7


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