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-flow.h: Move aux from tree_ann_common_d to stmt_ann_d


Hi,

Attached is a patch to move aux from tree_ann_common_d to stmt_ann_d
as it is only referenced from stmt_ann.

Once this patch goes in, I can probably merge aux and histogramsin
stmt_ann_d, but that's a separate patch.

Tested on i686-pc-linux-gnu.  OK to apply?

Kazu Hirata

2005-04-27  Kazu Hirata  <kazu@cs.umass.edu>

	* tree-flow.h (tree_ann_common_d): Move aux to ...
	(stmt_ann_d): ... here.
	* tree-ssa-loop-im.c (LIM_DATA, determine_invariantness_stmt,
	move_computations_stmt, schedule_sm): Update references to
	aux.
	* tree-vectorizer.h (set_stmt_info, vinfo_for_stmt): Likewise.

Index: tree-flow.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-flow.h,v
retrieving revision 2.98
diff -u -d -p -r2.98 tree-flow.h
--- tree-flow.h	23 Apr 2005 00:59:25 -0000	2.98
+++ tree-flow.h	26 Apr 2005 19:58:11 -0000
@@ -121,10 +121,6 @@ struct tree_ann_common_d GTY(())
   /* Annotation type.  */
   enum tree_ann_type type;
 
- /* Auxiliary info specific to a pass.  At all times, this
-    should either point to valid data or be NULL.  */
-  PTR GTY ((skip (""))) aux;
-
   /* The value handle for this expression.  Used by GVN-PRE.  */
   tree GTY((skip)) value_handle;
 };
@@ -325,6 +321,10 @@ struct stmt_ann_d GTY(())
      pass which needs statement UIDs.  */
   unsigned int uid;
 
+ /* Auxiliary info specific to a pass.  At all times, this
+    should either point to valid data or be NULL.  */
+  PTR GTY ((skip (""))) aux;
+
   /* Linked list of histograms for value-based profiling.  This is really a
      struct histogram_value*.  We use void* to avoid having to export that
      everywhere, and to avoid having to put it in GC memory.  */
Index: tree-ssa-loop-im.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-loop-im.c,v
retrieving revision 2.38
diff -u -d -p -r2.38 tree-ssa-loop-im.c
--- tree-ssa-loop-im.c	23 Apr 2005 00:59:29 -0000	2.38
+++ tree-ssa-loop-im.c	26 Apr 2005 19:58:11 -0000
@@ -101,7 +101,7 @@ struct lim_aux_data
 
 #define LIM_DATA(STMT) (TREE_CODE (STMT) == PHI_NODE \
 			? NULL \
-			: (struct lim_aux_data *) (stmt_ann (STMT)->common.aux))
+			: (struct lim_aux_data *) (stmt_ann (STMT)->aux))
 
 /* Description of a memory reference for store motion.  */
 
@@ -625,7 +625,7 @@ determine_invariantness_stmt (struct dom
 	  stmt = stmt1;
 	}
 
-      stmt_ann (stmt)->common.aux = xcalloc (1, sizeof (struct lim_aux_data));
+      stmt_ann (stmt)->aux = xcalloc (1, sizeof (struct lim_aux_data));
       LIM_DATA (stmt)->always_executed_in = outermost;
 
       if (maybe_never && pos == MOVE_PRESERVE_EXECUTION)
@@ -716,7 +716,7 @@ move_computations_stmt (struct dom_walk_
       cost = LIM_DATA (stmt)->cost;
       level = LIM_DATA (stmt)->tgt_loop;
       free_lim_aux_data (LIM_DATA (stmt));
-      stmt_ann (stmt)->common.aux = NULL;
+      stmt_ann (stmt)->aux = NULL;
 
       if (!level)
 	{
@@ -1171,7 +1171,7 @@ schedule_sm (struct loop *loop, edge *ex
 
   /* Emit the load & stores.  */
   load = build (MODIFY_EXPR, void_type_node, tmp_var, ref);
-  get_stmt_ann (load)->common.aux = xcalloc (1, sizeof (struct lim_aux_data));
+  get_stmt_ann (load)->aux = xcalloc (1, sizeof (struct lim_aux_data));
   LIM_DATA (load)->max_loop = loop;
   LIM_DATA (load)->tgt_loop = loop;
 
Index: tree-vectorizer.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-vectorizer.h,v
retrieving revision 2.19
diff -u -d -p -r2.19 tree-vectorizer.h
--- tree-vectorizer.h	12 Apr 2005 01:35:49 -0000	2.19
+++ tree-vectorizer.h	26 Apr 2005 19:58:11 -0000
@@ -241,14 +241,14 @@ static inline void
 set_stmt_info (stmt_ann_t ann, stmt_vec_info stmt_info)
 {
   if (ann)
-    ann->common.aux = (char *) stmt_info;
+    ann->aux = (char *) stmt_info;
 }
 
 static inline stmt_vec_info
 vinfo_for_stmt (tree stmt)
 {
   stmt_ann_t ann = stmt_ann (stmt);
-  return ann ? (stmt_vec_info) ann->common.aux : NULL;
+  return ann ? (stmt_vec_info) ann->aux : NULL;
 }
 
 /*-----------------------------------------------------------------*/


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