This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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, fortran] [30/66] inline sum and product: Update core structs: Move where flag.


This moves where field from gfc_ss to gfc_ss_info.
OK?

Attachment: pr43829-30.CL
Description: Text document

diff --git a/trans-array.c b/trans-array.c
index 427bb7b..045c426 100644
--- a/trans-array.c
+++ b/trans-array.c
@@ -2203,7 +2203,7 @@ gfc_add_loop_ss_code (gfc_loopinfo * loop, gfc_ss * ss, bool subscript,
 		 scalarization loop, except for WHERE assignments.  */
 	      if (subscript)
 		se.expr = convert(gfc_array_index_type, se.expr);
-	      if (!ss->where)
+	      if (!ss_info->where)
 		se.expr = gfc_evaluate_now (se.expr, &loop->pre);
 	      gfc_add_block_to_block (&loop->pre, &se.post);
 	    }
diff --git a/trans-stmt.c b/trans-stmt.c
index 101a651..86a56e8 100644
--- a/trans-stmt.c
+++ b/trans-stmt.c
@@ -4062,7 +4062,7 @@ gfc_trans_where_assign (gfc_expr *expr1, gfc_expr *expr2,
     {
       /* The rhs is scalar.  Add a ss for the expression.  */
       rss = gfc_get_scalar_ss (gfc_ss_terminator, expr2);
-      rss->where = 1;
+      rss->info->where = 1;
     }
 
   /* Associate the SS with the loop.  */
@@ -4501,7 +4501,7 @@ gfc_trans_where_3 (gfc_code * cblock, gfc_code * eblock)
   if (tsss == gfc_ss_terminator)
     {
       tsss = gfc_get_scalar_ss (gfc_ss_terminator, tsrc);
-      tsss->where = 1;
+      tsss->info->where = 1;
     }
   gfc_add_ss_to_loop (&loop, tdss);
   gfc_add_ss_to_loop (&loop, tsss);
@@ -4516,7 +4516,7 @@ gfc_trans_where_3 (gfc_code * cblock, gfc_code * eblock)
       if (esss == gfc_ss_terminator)
 	{
 	  esss = gfc_get_scalar_ss (gfc_ss_terminator, esrc);
-	  esss->where = 1;
+	  esss->info->where = 1;
 	}
       gfc_add_ss_to_loop (&loop, edss);
       gfc_add_ss_to_loop (&loop, esss);
diff --git a/trans.h b/trans.h
index 907c271..c35b1ae 100644
--- a/trans.h
+++ b/trans.h
@@ -214,6 +214,9 @@ typedef struct gfc_ss_info
      loops the terms appear in.  This will be 1 for the RHS expressions,
      2 for the LHS expressions, and 3(=1|2) for the temporary.  */
   unsigned useflags:2;
+
+  /* Suppresses precalculation of scalars in WHERE assignments.  */
+  unsigned where:1;
 }
 gfc_ss_info;
 
@@ -242,9 +245,7 @@ typedef struct gfc_ss
   struct gfc_ss *loop_chain;
   struct gfc_ss *next;
 
-  /* The bit 'where' suppresses precalculation of scalars in WHERE assignments.
-  */
-  unsigned where:1, is_alloc_lhs:1;
+  unsigned is_alloc_lhs:1;
 }
 gfc_ss;
 #define gfc_get_ss() XCNEW (gfc_ss)

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