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]

[tree-ssa]: Patch to add component_ref ref's


Apologies for the few bugfixes included in this patch that should be 
seperate patches.
My laptop, which has the "single patch" tree for each of them is out for 
repair, and the only tree i have here has all those patches applied.
Feel free to ignore them if you like, i can resubmit them in a week or two 
when my laptop gets back.

This patch creates defs and uses for component_refs, as well as clobbers 
for referenced fields due to structure assignment. It also creates partial 
defs for defs of fields, for the underlying parts of the 
component ref. We do *not* create the analogous partial uses (though we do 
create a full use of the referenced field, obviously), because 
nothing needs or wants them, and it's therefore a waste of memory (we only 
increase memory usage compared to before this patch insofar as 
we create any partial defs of underlying variables. For uses, we create 
the same number of refs we did before).

The partial defs are only necessary so that a full structure use (ie 
a = b, where b is a structure) gets the right reaching definition when 
it's fields are defined.  If one felt like teaching SSA-CCP this, and 
making the optimizers know this in general, you could remove the partial 
defs.

Creating the right references at the right times  under these constraints 
is not easy, thus, the extra argument to find_refs_in_expr.
The main trick cases are involving component_refs with array and 
indirect refs embedded in them (thus, the reason we can't just *not* 
recurse, instead, we have to just skip creating refs for that part).

Clobbering due to union *field* assignment is not implemented right now, 
but it's trivial to add (In fact, if the rest of this patch is okay, I can 
add it before committing it).

This patch was bootstrapped on i686-pc-linux, and regression tested *with* 
SSA-CCP enabled (I also verified that SSA-CCP does make substitutions of 
constants into structure assignments during compiling gcc).
No regressions.

Diego, if you want major cleanups or anything besides field union 
clobbering, I likely won't get to it until after final exams.

2002-11-19  Daniel Berlin  <dberlin@dberlin.org>

	* tree-dfa.c (struct dfa_stats_d): Track component ref stats as well.
	(add_defined_var): New function.
	(num_defined_vars): New variable.
	(defined_vars): Ditto.
	(find_refs_in_expr): Add no_comp_refs argument, update all callers.
	Create component refs, and partial defs for the underlying base thing
	in the case of defs, but no partial uses.  Create clobbers for fields
	on structure assignment.  Also handle defined_vars stuff.
	(is_record_or_union): New function.
	(clobber_fields_for): New function.
	(replace_ref_r): COMPONENT_REF can't be compared directly either.
	(dump_dfa_stats): Dump component ref stats and defined var stats.
	(compute_may_aliases): Use defined_vars not referenced_vars.
	(offset_for): New function.
	(decl_for_component_ref): Ditto.
	(offset_match): Ditto.
	(may_alias_p): Modify to handle COMPONENT_REF properly.
	(find_may_aliases_for): Use defined_vars, not referenced_vars.
	(output_ref): Partial refs are not output refs, except for arrays.

	* tree-flow-inline.h (cref_equal_p): New function.
	(component_ref): Ditto.
	(get_component_ref_index): Ditto.
	(num_component_ref): Ditto.
	(add_component_ref): Ditto

	* tree-flow.h (var_ref_d): Fix gc problem noticed while debugging
	component_ref stuff.
	(var_phi_d): Ditto.
	(expr_phi_d): Ditto.
	(tree_ann_d): Add component_ref structure for storing canonical
	component_refs.
	(tree_flags): Add TF_DEFINED.
	(component_ref): Add prototype.
	(get_component_ref_index): Ditto.
	(num_component_ref): Ditto.
	(add_component_ref): Ditto.
	(defined_vars): Ditto.
	(num_defined_vars): Ditto.

	* tree-ssa-ccp.c (visit_assignment): Fix widening for realities of
	today.
	
	* tree-ssa.c (init_tree_ssa): Init *defined_vars stuff.
	(delete_tree_ssa): Fix gc problem by emptying the bb refs list, 
	and removing the annotation on global_var.  
	Delete the defined_vars stuff. 

	* alias.c (nonoverlapping_component_refs_p): Unstaticify, so we can
	use it elsewhere.
	
Index: tree-dfa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-dfa.c,v
retrieving revision 1.1.4.47
diff -u -3 -p -r1.1.4.47 tree-dfa.c
--- tree-dfa.c	13 Nov 2002 21:04:39 -0000	1.1.4.47
+++ tree-dfa.c	21 Nov 2002 03:15:11 -0000
@@ -57,12 +57,17 @@ struct replace_data_d
 struct dfa_stats_d
 {
   unsigned long num_tree_refs;
+  unsigned long num_cref_tree_refs;
   unsigned long size_tree_refs;
+  unsigned long size_cref_tree_refs;
   unsigned long num_tree_anns;
   unsigned long num_ref_list_nodes;
   unsigned long num_defs;
+  unsigned long num_cref_defs;
   unsigned long num_uses;
+  unsigned long num_cref_uses;
   unsigned long num_phis;
+  unsigned long num_cref_phis;
   unsigned long num_phi_args;
   unsigned long max_num_phi_args;
   unsigned long num_ephis;
@@ -84,8 +89,9 @@ extern int tree_ssa_dump_flags;
 /* Local functions.  */
 static void find_refs_in_expr		PARAMS ((tree *, enum tree_ref_type,
       						 unsigned, basic_block,
-						 tree *));
+						 tree *, unsigned));
 static void add_referenced_var		PARAMS ((tree));
+static void add_defined_var 		PARAMS ((tree));
 static void dump_if_different		PARAMS ((FILE *, const char * const,
      						 unsigned long, unsigned long));
 static void collect_dfa_stats		PARAMS ((struct dfa_stats_d *));
@@ -100,7 +106,13 @@ static void find_may_aliases_for	PARAMS 
 static void add_may_alias		PARAMS ((tree, tree));
 static inline bool may_alias_p		PARAMS ((tree, tree));
 static size_t tree_ref_size		PARAMS ((enum tree_ref_type));
+static inline tree create_indirect_ref	PARAMS ((tree));
+static HOST_WIDE_INT offset_for PARAMS ((tree));
+static tree decl_for_component_ref PARAMS ((tree));
+static bool offset_match PARAMS ((tree, tree));
 static tree replace_ref_r		PARAMS ((tree *, int *, void *));
+static inline bool is_record_or_union PARAMS ((tree));
+static void clobber_fields_for PARAMS ((tree, tree, basic_block, tree *));
 
 
 /* Global declarations.  */
@@ -109,6 +121,9 @@ static tree replace_ref_r		PARAMS ((tree
 unsigned long num_referenced_vars;
 varray_type referenced_vars;
 
+unsigned long num_defined_vars;
+varray_type defined_vars;
+
 /* Next unique reference ID to be assigned by create_ref().  */
 unsigned long next_tree_ref_id;
 
@@ -170,29 +185,29 @@ find_refs_in_stmt (stmt_p, bb)
   switch (code)
     {
     case COND_EXPR:
-      find_refs_in_expr (&COND_EXPR_COND (stmt), V_USE, 0, bb, stmt_p);
+      find_refs_in_expr (&COND_EXPR_COND (stmt), V_USE, 0, bb, stmt_p, 0);
       break;
 
     case SWITCH_EXPR:
-      find_refs_in_expr (&SWITCH_COND (stmt), V_USE, 0, bb, stmt_p);
+      find_refs_in_expr (&SWITCH_COND (stmt), V_USE, 0, bb, stmt_p, 0);
       break;
 
     case ASM_EXPR:
-      find_refs_in_expr (&ASM_INPUTS (stmt), V_USE, 0, bb, stmt_p);
-      find_refs_in_expr (&ASM_OUTPUTS (stmt), V_DEF, TRM_CLOBBER, bb, stmt_p);
-      find_refs_in_expr (&ASM_CLOBBERS (stmt), V_DEF, TRM_CLOBBER, bb, stmt_p);
+      find_refs_in_expr (&ASM_INPUTS (stmt), V_USE, 0, bb, stmt_p, 0);
+      find_refs_in_expr (&ASM_OUTPUTS (stmt), V_DEF, TRM_CLOBBER, bb, stmt_p, 0);
+      find_refs_in_expr (&ASM_CLOBBERS (stmt), V_DEF, TRM_CLOBBER, bb, stmt_p, 0);
       break;
 
     case RETURN_EXPR:
-      find_refs_in_expr (&TREE_OPERAND (stmt, 0), V_USE, 0, bb, stmt_p);
+      find_refs_in_expr (&TREE_OPERAND (stmt, 0), V_USE, 0, bb, stmt_p, 0);
       break;
 
     case GOTO_EXPR:
-      find_refs_in_expr (&GOTO_DESTINATION (stmt), V_USE, 0, bb, stmt_p);
+      find_refs_in_expr (&GOTO_DESTINATION (stmt), V_USE, 0, bb, stmt_p, 0);
       break;
 
     case LABEL_EXPR:
-      find_refs_in_expr (&LABEL_EXPR_LABEL (stmt), V_USE, 0, bb, stmt_p);
+      find_refs_in_expr (&LABEL_EXPR_LABEL (stmt), V_USE, 0, bb, stmt_p, 0);
       break;
 
       /* These nodes contain no variable references.  */
@@ -202,11 +217,60 @@ find_refs_in_stmt (stmt_p, bb)
       break;
 
     default:
-      find_refs_in_expr (stmt_p, V_USE, 0, bb, stmt_p);
+      find_refs_in_expr (stmt_p, V_USE, 0, bb, stmt_p, 0);
     }
 }
 
+/* Determine if t is a union or structure type. */
+static inline bool
+is_record_or_union (t)
+     tree t;
+{
+  tree type = TREE_TYPE (t);
+  if (AGGREGATE_TYPE_P (type) && TREE_CODE (type) != ARRAY_TYPE)
+    return true;
+  return false;
+}
 
+/* Recursively clobber referenced fields for the structure in EXPR. */
+static void 
+clobber_fields_for (expr, prefix, bb, parent_stmt_p)
+     tree expr;
+     tree prefix;
+     basic_block bb;
+     tree *parent_stmt_p;
+{
+  tree field;
+  for (field = TYPE_FIELDS (TREE_TYPE (expr)); field; field = TREE_CHAIN (field))
+    {
+      tree newref;
+      int i;
+      
+      /* Only care about fields. */
+      if (TREE_CODE (field) != FIELD_DECL)
+	continue;
+      
+      /* First build our new component_ref. */
+      newref = build (COMPONENT_REF, TREE_TYPE (field), prefix, field);
+      
+      /* Now recurse if the field is a structure/union itself. */
+      if (is_record_or_union (field))
+	clobber_fields_for (field, newref, bb, parent_stmt_p);
+
+      /* If the field hasn't been referenced yet, skip it. */
+      if (num_component_ref (field) == 0)
+	continue;
+      
+      /* Otherwise, get the canonical component_ref and create the clobber. */
+      i = get_component_ref_index (newref);
+      if (i == -1)
+	{
+	  add_component_ref (newref); 
+	  i = get_component_ref_index (newref);
+	}
+      create_ref (component_ref (newref, i), V_DEF, TRM_CLOBBER, bb, parent_stmt_p, 1);
+    }
+}
 /* Recursively scan the expression tree pointed by EXPR_P looking for
    variable references.
    
@@ -217,12 +281,13 @@ find_refs_in_stmt (stmt_p, bb)
    BB and PARENT_STMT_P give the location of *EXPR_P in the program.  */
 
 static void
-find_refs_in_expr (expr_p, ref_type, ref_mod, bb, parent_stmt_p)
+find_refs_in_expr (expr_p, ref_type, ref_mod, bb, parent_stmt_p, no_comp_refs)
      tree *expr_p;
      enum tree_ref_type ref_type;
      unsigned ref_mod;
      basic_block bb;
      tree *parent_stmt_p;
+     unsigned no_comp_refs;
 {
   enum tree_code code;
   char class;
@@ -269,6 +334,9 @@ find_refs_in_expr (expr_p, ref_type, ref
   /* If we found a _DECL node, create a reference to it and return.  */
   if (code == VAR_DECL || code == PARM_DECL)
     {
+      if (is_record_or_union (expr) && no_comp_refs)
+	return;
+
       create_ref (expr, ref_type, ref_mod, bb, parent_stmt_p, 1);
 
       /* If we just created a V_DEF reference for a pointer variable 'p',
@@ -283,7 +351,10 @@ find_refs_in_expr (expr_p, ref_type, ref
 	  create_ref (indirect_var (expr), V_DEF, TRM_RELOCATE, bb,
 		      parent_stmt_p, 1);
 	}
-
+      else if (ref_type == V_DEF && is_record_or_union (expr))
+	{
+	  clobber_fields_for (expr, expr, bb, parent_stmt_p);
+	}
       return;
     }
 
@@ -320,7 +391,7 @@ find_refs_in_expr (expr_p, ref_type, ref
       tree ptr_sym = get_base_symbol (ptr);
 
       /* Create a V_USE reference for the pointer variable itself.  */
-      find_refs_in_expr (&TREE_OPERAND (expr, 0), V_USE, 0, bb, parent_stmt_p);
+      find_refs_in_expr (&TREE_OPERAND (expr, 0), V_USE, 0, bb, parent_stmt_p, 0);
 
       /* If this is the first INDIRECT_REF node we find for PTR, set EXPR
 	 to be the indirect variable used to represent all dereferences of
@@ -344,11 +415,11 @@ find_refs_in_expr (expr_p, ref_type, ref
     {
       /* Change the reference type to a partial def/use when processing
 	 the LHS of the reference.  */
-      find_refs_in_expr (&TREE_OPERAND (expr, 0), ref_type,
-	                 ref_mod | TRM_PARTIAL, bb, parent_stmt_p);
+      find_refs_in_expr (&TREE_OPERAND (expr, 0), ref_type, 
+			 ref_mod | TRM_PARTIAL, bb, parent_stmt_p, 0);
 
       /* References on the RHS of the array are always used as indices.  */
-      find_refs_in_expr (&TREE_OPERAND (expr, 1), V_USE, 0, bb, parent_stmt_p);
+      find_refs_in_expr (&TREE_OPERAND (expr, 1), V_USE, 0, bb, parent_stmt_p, 0);
       return;
     }
 
@@ -365,21 +436,42 @@ find_refs_in_expr (expr_p, ref_type, ref
 	   will not be constant propagated because the two partial
 	   definitions to 'a' will kill each other.  SSA needs to be
 	   enhanced to deal with this case.  */
-  if (code == IMAGPART_EXPR || code == REALPART_EXPR || code == COMPONENT_REF)
+  if (code == IMAGPART_EXPR || code == REALPART_EXPR)
     {
       /* Modify the reference to be a partial reference of the LHS of the
 	 expression.  */
       find_refs_in_expr (&TREE_OPERAND (expr, 0), ref_type,
-	                 ref_mod | TRM_PARTIAL, bb, parent_stmt_p);
+	                 ref_mod | TRM_PARTIAL, bb, parent_stmt_p, 0);
+      return;
+    }
+  
+  if (code == COMPONENT_REF)
+    {
+      int i;
+      /* Modify the reference to be a partial reference of the LHS of the
+	 expression.  */
+      find_refs_in_expr (&TREE_OPERAND (expr, 0), ref_type,
+	                 ref_mod | TRM_PARTIAL , bb, parent_stmt_p, 
+			 ref_type == V_DEF ? 0 : 1);
+      if (!no_comp_refs)
+	{
+	  i = get_component_ref_index (expr);
+	  if (i == -1)
+	    {
+	      add_component_ref (expr);      
+	      i = get_component_ref_index (expr);
+	    }
+	  create_ref (component_ref (expr, i),
+		      ref_type, ref_mod, bb, parent_stmt_p,  1);
+	}
       return;
     }
-
   /* Assignments.  These are the only expressions that create pure V_DEF
      references.  */
   if (code == INIT_EXPR || code == MODIFY_EXPR)
     {
-      find_refs_in_expr (&TREE_OPERAND (expr, 1), V_USE, 0, bb, parent_stmt_p);
-      find_refs_in_expr (&TREE_OPERAND (expr, 0), V_DEF, 0, bb, parent_stmt_p);
+      find_refs_in_expr (&TREE_OPERAND (expr, 1), V_USE, 0, bb, parent_stmt_p, 0);
+      find_refs_in_expr (&TREE_OPERAND (expr, 0), V_DEF, 0, bb, parent_stmt_p, 0);
       return;
     }
  
@@ -399,9 +491,9 @@ find_refs_in_expr (expr_p, ref_type, ref
       tree callee;
       int flags;
 
-      find_refs_in_expr (&TREE_OPERAND (expr, 0), V_USE, 0, bb, parent_stmt_p);
+      find_refs_in_expr (&TREE_OPERAND (expr, 0), V_USE, 0, bb, parent_stmt_p, 0);
 
-      find_refs_in_expr (&TREE_OPERAND (expr, 1), V_USE, 0, bb, parent_stmt_p);
+      find_refs_in_expr (&TREE_OPERAND (expr, 1), V_USE, 0, bb, parent_stmt_p, 0);
 
       callee = get_callee_fndecl (expr);
       flags = (callee) ? flags_from_decl_or_type (callee) : 0;
@@ -424,7 +516,7 @@ find_refs_in_expr (expr_p, ref_type, ref
   if (code == ADDR_EXPR)
     {
       find_refs_in_expr (&TREE_OPERAND (expr, 0), V_USE, TRM_ADDRESSOF, bb,
-			 parent_stmt_p);
+			 parent_stmt_p, 0);
       return;
     }
 
@@ -435,7 +527,7 @@ find_refs_in_expr (expr_p, ref_type, ref
 
       for (op = expr; op; op = TREE_CHAIN (op))
 	find_refs_in_expr (&TREE_VALUE (op), ref_type, ref_mod, bb,
-	                   parent_stmt_p);
+	                   parent_stmt_p, 0);
       return;
     }
 
@@ -445,7 +537,7 @@ find_refs_in_expr (expr_p, ref_type, ref
       || code == BIT_FIELD_REF)
     {
       find_refs_in_expr (&TREE_OPERAND (expr, 0), ref_type, ref_mod, bb,
-			 parent_stmt_p);
+			 parent_stmt_p, 0);
       return;
     }
 
@@ -459,9 +551,9 @@ find_refs_in_expr (expr_p, ref_type, ref
       || code == CONSTRUCTOR)
     {
       find_refs_in_expr (&TREE_OPERAND (expr, 0), ref_type, ref_mod, bb,
-		         parent_stmt_p);
+		         parent_stmt_p, 0);
       find_refs_in_expr (&TREE_OPERAND (expr, 1), ref_type, ref_mod, bb,
-	                 parent_stmt_p);
+	                 parent_stmt_p, 0);
       return;
     }
 
@@ -806,7 +898,8 @@ create_ref (var, ref_type, ref_mod, bb, 
        || ref_type == V_USE
        || ref_type == V_PHI)
       && ! DECL_P (var)
-      && TREE_CODE (var) != INDIRECT_REF)
+      && TREE_CODE (var) != INDIRECT_REF
+      && TREE_CODE (var) != COMPONENT_REF)
     abort ();
 #endif
 
@@ -862,7 +955,7 @@ create_ref (var, ref_type, ref_mod, bb, 
 	  for (in = bb->pred, num = 0; in; in = in->pred_next)
 	    num++;
 
-	  VARRAY_GENERIC_PTR_INIT (ref->vphi.phi_args, num, "phi_args");
+	  VARRAY_GENERIC_PTR_INIT (ref->vphi.phi_args, 1, "phi_args");
 	}
     }
   else if (ref_type == V_USE)
@@ -888,9 +981,13 @@ create_ref (var, ref_type, ref_mod, bb, 
       /* Add the variable to the list of variables referenced in this
 	 function.  But only for actual variable defs or uses in the code.  */
       if ((ref_type == V_DEF || ref_type == V_USE)
-	  && (DECL_P (var) || TREE_CODE (var) == INDIRECT_REF))
+	  && (DECL_P (var) || TREE_CODE (var) == INDIRECT_REF 
+	      || TREE_CODE (var) == COMPONENT_REF))
 	add_referenced_var (var);
-
+      if (ref_type == V_DEF && !is_default_def (ref) 
+	  && (DECL_P (var) || TREE_CODE (var) == INDIRECT_REF 
+	      || TREE_CODE (var) == COMPONENT_REF))
+	add_defined_var (var);
       /* Add this reference to the list of references for the variable.  */
       add_tree_ref (var, ref);
 
@@ -957,6 +1054,10 @@ static void
 add_referenced_var (var)
      tree var;
 {
+  if (TREE_CODE (var) == INDIRECT_REF)
+    var = indirect_var (get_base_symbol (var));
+  else if (TREE_CODE (var) == COMPONENT_REF)
+    var = component_ref (var, get_component_ref_index (var));
   if (tree_flags (var) & TF_REFERENCED)
     return;
 
@@ -967,6 +1068,26 @@ add_referenced_var (var)
   num_referenced_vars = VARRAY_ACTIVE_SIZE (referenced_vars);
 }
 
+/* Add a unique copy of variable VAR to the list of referenced variables.  */
+
+static void
+add_defined_var (var)
+     tree var;
+{
+  if (TREE_CODE (var) == INDIRECT_REF)
+    var = indirect_var (get_base_symbol (var));
+  else if (TREE_CODE (var) == COMPONENT_REF)
+    var = component_ref (var, get_component_ref_index (var));
+  if (tree_flags (var) & TF_DEFINED)
+    return;
+
+  /* The variable has not been referenced yet.  Mark it referenced and add it
+     to the list.  */
+  set_tree_flag (var, TF_DEFINED);
+  VARRAY_PUSH_TREE (defined_vars, var);
+  num_defined_vars = VARRAY_ACTIVE_SIZE (defined_vars);
+}
+
 
 /*---------------------------------------------------------------------------
 			     Code replacement
@@ -1054,8 +1175,9 @@ replace_ref_in (stmt, ref, op)
     case LOOP_EXPR:
     case BIND_EXPR:
     case CASE_LABEL_EXPR:
+    case COMPONENT_REF:
       break;
-
+    
     default:
       abort ();
     }
@@ -1075,11 +1197,15 @@ replace_ref_r (tp, walk_subtrees, data)
   tree old = replace_data->old;
   tree new = replace_data->new;
 
-  /* INDIRECT_REF nodes cannot be compared directly.  */
+  /* INDIRECT_REF and COMPONENT_REF nodes cannot be compared directly.  */
   if (TREE_CODE (old) == INDIRECT_REF
       && TREE_CODE (t) == INDIRECT_REF
       && TREE_OPERAND (old, 0) == TREE_OPERAND (t, 0))
     *tp = new;
+  else if (TREE_CODE (old) == COMPONENT_REF 
+      && TREE_CODE (t) == COMPONENT_REF
+      && cref_equal_p (old, t))
+    *tp = new;
   else if (old == t)
     *tp = new;
 
@@ -1490,6 +1616,10 @@ dump_dfa_stats (file)
   fprintf (file, fmt_str_1, "Referenced variables", num_referenced_vars, 
 	   SCALE (size), LABEL (size));
 
+  size = num_defined_vars * sizeof (tree);
+  fprintf (file, fmt_str_1, "Defined variables", num_defined_vars,
+	   SCALE (size), LABEL (size));
+
   size = dfa_stats.num_tree_anns * sizeof (struct tree_ann_d);
   total += size;
   fprintf (file, fmt_str_1, "Trees annotated", dfa_stats.num_tree_anns,
@@ -1519,6 +1649,10 @@ dump_dfa_stats (file)
   total += size;
   fprintf (file, fmt_str_1, "Variable references", dfa_stats.num_tree_refs,
 	   SCALE (size), LABEL (size));
+  
+  size = dfa_stats.size_cref_tree_refs;
+  fprintf (file, fmt_str_1, "Component references", dfa_stats.num_cref_tree_refs,
+	   SCALE (size), LABEL (size));
 
   if (dfa_stats.num_tree_refs == 0)
     dfa_stats.num_tree_refs = 1;
@@ -1526,14 +1660,26 @@ dump_dfa_stats (file)
   if (dfa_stats.num_defs)
     fprintf (file, fmt_str_2, "    V_DEF", dfa_stats.num_defs,
 	     PERCENT (dfa_stats.num_defs, dfa_stats.num_tree_refs));
+  
+  if (dfa_stats.num_cref_defs)
+    fprintf (file, fmt_str_2, "    V_DEF (cref)", dfa_stats.num_cref_defs,
+	     PERCENT (dfa_stats.num_cref_defs, dfa_stats.num_tree_refs));
 
   if (dfa_stats.num_uses)
     fprintf (file, fmt_str_2, "    V_USE", dfa_stats.num_uses,
 	     PERCENT (dfa_stats.num_uses, dfa_stats.num_tree_refs));
+  
+  if (dfa_stats.num_cref_uses)
+    fprintf (file, fmt_str_2, "    V_USE (cref)", dfa_stats.num_cref_uses,
+	     PERCENT (dfa_stats.num_cref_uses, dfa_stats.num_tree_refs));
 
   if (dfa_stats.num_phis)
     fprintf (file, fmt_str_2, "    V_PHI", dfa_stats.num_phis,
 	     PERCENT (dfa_stats.num_phis, dfa_stats.num_tree_refs));
+  
+  if (dfa_stats.num_cref_phis)
+    fprintf (file, fmt_str_2, "    V_PHI (cref)", dfa_stats.num_cref_phis,
+	     PERCENT (dfa_stats.num_cref_phis, dfa_stats.num_tree_refs));
 
   if (dfa_stats.num_ephis)
     fprintf (file, fmt_str_2, "    E_PHI", dfa_stats.num_ephis,
@@ -1692,7 +1838,11 @@ count_tree_refs (dfa_stats_p, list)
     {
       tree_ref ref = rli_ref (i);
       dfa_stats_p->num_tree_refs++;
+      if (ref_var (ref) && TREE_CODE (ref_var (ref)) == COMPONENT_REF)
+        dfa_stats_p->num_cref_tree_refs++;
       dfa_stats_p->size_tree_refs += tree_ref_size (ref_type (ref));
+      if (ref_var (ref) && TREE_CODE (ref_var (ref)) == COMPONENT_REF)
+        dfa_stats_p->size_cref_tree_refs += tree_ref_size (ref_type (ref));
 
       if (ref->vref.alias_imm_rdefs)
 	{
@@ -1705,18 +1855,24 @@ count_tree_refs (dfa_stats_p, list)
       if (ref_type (ref) == V_DEF)
 	{
 	  dfa_stats_p->num_defs++;
+	  if (ref_var (ref) && TREE_CODE (ref_var (ref)) == COMPONENT_REF)
+	    dfa_stats_p->num_cref_defs++;
 	  count_ref_list_nodes (dfa_stats_p, imm_uses (ref));
 	  count_ref_list_nodes (dfa_stats_p, reached_uses (ref));
 	}
       else if (ref_type (ref) == V_USE)
 	{
 	  dfa_stats_p->num_uses++;
+	  if (ref_var (ref) && TREE_CODE (ref_var (ref)) == COMPONENT_REF)
+	    dfa_stats_p->num_cref_uses++;
 	  count_ref_list_nodes (dfa_stats_p, reaching_defs (ref));
 	}
       else if (ref_type (ref) == V_PHI)
 	{
 	  unsigned int num = num_phi_args (ref);
 	  dfa_stats_p->num_phis++;
+	  if (ref_var (ref) && TREE_CODE (ref_var (ref)) == COMPONENT_REF)
+	    dfa_stats_p->num_cref_phis++;
 	  dfa_stats_p->num_phi_args += num;
 	  if (num > dfa_stats_p->max_num_phi_args)
 	    dfa_stats_p->max_num_phi_args = num;
@@ -1837,23 +1993,22 @@ compute_may_aliases ()
 {
   unsigned long i;
   
-  if (flag_tree_points_to != PTA_NONE  && num_referenced_vars)
+  if (flag_tree_points_to != PTA_NONE  && num_defined_vars)
     {
       timevar_push (TV_TREE_PTA);
       create_alias_vars ();
       timevar_pop (TV_TREE_PTA);
     }
-
-  for (i = 0; i < num_referenced_vars; i++)
+  
+  for (i = 0; i < num_defined_vars; i++)
     {
-      tree var = referenced_var (i);
-
+      tree var = defined_var (i);
       /* Find aliases for pointer variables.  */
       if (TREE_CODE (var) == INDIRECT_REF)
 	find_may_aliases_for (var);
     }
 
-  if (flag_tree_points_to != PTA_NONE && num_referenced_vars)
+  if (flag_tree_points_to != PTA_NONE && num_defined_vars)
     {
       timevar_push (TV_TREE_PTA);
       delete_alias_vars ();
@@ -1861,6 +2016,77 @@ compute_may_aliases ()
     }
 }
 
+/* Based on adjust_offset_for_component_ref from alias.c */
+static HOST_WIDE_INT
+offset_for (t1)
+     tree t1;
+{
+  HOST_WIDE_INT t1offset = 0;
+  
+  do 
+    {
+      tree field = TREE_OPERAND (t1, 1);
+      if (!host_integerp (DECL_FIELD_OFFSET (field), 1))
+	return -1;
+      t1offset += (tree_low_cst (DECL_FIELD_OFFSET (field), 1)
+		   + (tree_low_cst (DECL_FIELD_BIT_OFFSET  (field), 1)
+		      / BITS_PER_UNIT));
+      t1 = TREE_OPERAND (t1, 0);
+    } while (t1 && TREE_CODE (t1) == COMPONENT_REF);
+  
+  return t1offset;
+}
+
+/* Stolen from alias.c (not worth externalizing) */
+static tree
+decl_for_component_ref (x)
+     tree x;
+{
+  do
+    {
+      x = TREE_OPERAND (x, 0);
+    }
+  while (x && TREE_CODE (x) == COMPONENT_REF);
+
+  return x && DECL_P (x) ? x : NULL_TREE;
+}      
+
+/* Based somewhat on code in nonoverlapping_memrefs_p.
+   This isn't quite correct, it's incredibly conservative. */
+static bool
+offset_match (t1, t2)
+     tree t1;
+     tree t2;
+{
+  HOST_WIDE_INT t1offset = 0;
+  HOST_WIDE_INT t2offset = 0;
+  tree t1decl;
+  tree t2decl;
+  
+  t1offset = offset_for (t1);
+  t2offset = offset_for (t2);
+  
+  if (t1offset == -1 || t2offset == -1)
+    return true;
+  
+  t1decl = decl_for_component_ref (t1);
+  t2decl = decl_for_component_ref (t2);
+  if (t1decl== NULL_TREE || t2decl == NULL_TREE)
+    return true;
+  
+  /* This is the part way too conservative.  In reality, it's something like
+     if (TREE_TYPE (t1decl) == TREE_TYPE (t2decl) || <t1decl or t2decl is
+     a <union*> (i.e. a union or a union containing a union, ...) with
+     TREE_TYPE of a union member == TREE_TYPE (the other decl)) 
+     && t1offset == t2offset. Or, simply, if baset1_offset + t1offset ==
+     baset2_offset + t2offset. */
+
+  if (t1decl == t2decl || t1offset == t2offset) 
+    return true;
+  
+  return false;
+  
+}
 
 /* Return true if INDIRECT_PTR (an INDIRECT_REF node) may alias VAR (a
    VAR_DECL or INDIRECT_REF node).  FIXME  This returns true more often
@@ -1874,14 +2100,22 @@ may_alias_p (indirect_ptr, var)
   HOST_WIDE_INT ptr_alias_set, var_alias_set;
   tree ptr_sym = get_base_symbol (indirect_ptr);
   tree var_sym = get_base_symbol (var);
-  
-  /* GLOBAL_VAR aliases every global variable, pointer dereference and
-     locals that have had their address taken, unless points-to analysis is
-     done.  This is because points-to is supposed to handle this case, and
-     thus, can give a more accurate answer.   */
-  if (flag_tree_points_to == PTA_NONE
-      && ptr_sym == global_var
-      && (TREE_ADDRESSABLE (var_sym)
+  tree temp;
+
+  /* GLOBAL_VAR aliases every global variable and locals that have had
+     their address taken, unless points-to analysis is done. This is because
+     points-to is supposed to handle this case, and thus, can give a more
+     accurate answer.   */
+  /* For component refs, we care about the field and it's base for
+     the purposes of global var comparison, but for local stuff, only
+     about the field. */
+  temp = var_sym;
+  if (TREE_CODE (var) == COMPONENT_REF)
+    temp = TREE_OPERAND (var, 1);
+
+  if (flag_tree_points_to == PTA_NONE && 
+      ptr_sym == global_var
+      && (TREE_ADDRESSABLE (temp) || TREE_ADDRESSABLE (var_sym)
 	  || TREE_CODE (var) == INDIRECT_REF
 	  || decl_function_context (var_sym) == NULL))
     return true;
@@ -1890,9 +2124,11 @@ may_alias_p (indirect_ptr, var)
      each other.  */
   if (var_sym == ptr_sym
       || DECL_ARTIFICIAL (var_sym)
-      /* Only check for addressability on non-pointers.  Even if VAR is 
-	 a non-addressable pointer, it may still alias with INDIRECT_PTR.  */
-      || (DECL_P (var) && !TREE_ADDRESSABLE (var)))
+      || (DECL_P (temp) && TREE_CODE (var) != INDIRECT_REF && !TREE_ADDRESSABLE (temp))
+      || (TREE_CODE (var) == COMPONENT_REF 
+	  && TREE_CODE (TREE_OPERAND (indirect_ptr, 0)) == COMPONENT_REF 
+	  && (nonoverlapping_component_refs_p (var, TREE_OPERAND (indirect_ptr, 0)))
+	  /*	      || !offset_match (var_sym, ptr_sym)*/))
     return false;
 
   ptr_alias_set = get_alias_set (TREE_TYPE (indirect_ptr));
@@ -1921,10 +2157,9 @@ find_may_aliases_for (indirect_ptr)
   if (TREE_CODE (indirect_ptr) != INDIRECT_REF)
     abort ();
 #endif
-
-  for (i = 0; i < num_referenced_vars; i++)
+  for (i = 0; i < num_defined_vars; i++)
     {
-      tree var = referenced_var (i);
+      tree var = defined_var (i);
 
       /* If *PTR may alias VAR, add *PTR to the list of may-aliases of VAR,
 	 and VAR to the list of may-aliases of *PTR.  */
@@ -2032,7 +2267,8 @@ add_may_alias (var, alias)
   if (TREE_CODE (alias) != VAR_DECL
       && TREE_CODE (alias) != PARM_DECL
       && TREE_CODE (alias) != FUNCTION_DECL
-      && TREE_CODE (alias) != INDIRECT_REF)
+      && TREE_CODE (alias) != INDIRECT_REF
+      && TREE_CODE (alias) != COMPONENT_REF)
     abort ();
 #endif
 
@@ -2150,7 +2386,11 @@ output_ref (t)
       for (i = rli_start (tree_refs (t)); !rli_after_end (i); rli_step (&i))
 	{
 	  tree_ref def = rli_ref (i);
-	  if (ref_type (def) == V_DEF && !def->vdef.m_clobber)
+	  /* Array refs are partial defs right now, but they are output refs.*/
+
+	  if (ref_type (def) == V_DEF && !def->vdef.m_clobber 
+	     && (TREE_CODE (ref_var (def)) != COMPONENT_REF 
+		 || (TREE_CODE (TREE_TYPE (ref_var (def))) == ARRAY_TYPE || !is_partial_def (def))))
 	    return def;
 	}
     }
Index: tree-flow-inline.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-flow-inline.h,v
retrieving revision 1.1.2.14
diff -u -3 -p -r1.1.2.14 tree-flow-inline.h
--- tree-flow-inline.h	13 Nov 2002 21:04:39 -0000	1.1.2.14
+++ tree-flow-inline.h	21 Nov 2002 03:15:12 -0000
@@ -200,7 +200,8 @@ set_currdef_for (v, def)
   tree_ann ann;
 #if defined ENABLE_CHECKING
   if (TREE_CODE_CLASS (TREE_CODE (v)) != 'd'
-      && TREE_CODE (v) != INDIRECT_REF)
+      && TREE_CODE (v) != INDIRECT_REF
+      && TREE_CODE (v) != COMPONENT_REF)
     abort ();
 
   if (def && ref_type (def) != V_DEF && ref_type (def) != V_PHI)
@@ -320,13 +321,116 @@ tree_flags (t)
 {
   return tree_annotation (t) ? tree_annotation (t)->flags : 0;
 }
+static inline bool cref_equal_p PARAMS ((tree, tree));
+
+static inline bool 
+cref_equal_p (t1, t2)
+     tree t1;
+     tree t2;   
+{
+  if (t1 == t2)
+    return true;
+
+  if (TREE_CODE (t1) != TREE_CODE (t2))
+    return false;
+  
+  switch (TREE_CODE (t1))
+    {
+    case INDIRECT_REF:
+      return cref_equal_p (TREE_OPERAND (t1, 0), TREE_OPERAND (t2, 0));
+    case INTEGER_CST:
+    case REAL_CST:
+    case STRING_CST:
+       return simple_cst_equal (t1, t2);
+
+    case ARRAY_REF:
+    case COMPONENT_REF:
+      return cref_equal_p (TREE_OPERAND (t1, 0), TREE_OPERAND (t2, 0)) 
+	&& cref_equal_p (TREE_OPERAND (t1, 1), TREE_OPERAND (t2, 1));
+    default:
+      return t1 == t2;
+    }
+}
+
+static inline tree
+component_ref (ref, i)
+     tree ref;
+     unsigned int i;
+{
+  tree_ann ann;
+#if defined ENABLE_CHECKING
+  if (TREE_CODE (ref) != COMPONENT_REF && TREE_CODE (ref) != FIELD_DECL)
+	 abort ();
+#endif
+  if (TREE_CODE (ref) == FIELD_DECL)
+    ann = tree_annotation (ref);
+  else
+    ann = tree_annotation (TREE_OPERAND (ref, 1));
+  return VARRAY_GENERIC_PTR (ann->component_ref, i);
+}
+
+static inline int
+get_component_ref_index (ref)
+     tree ref;
+{
+  tree_ann ann;
+  int i;
+#if ENABLE_CHECKING
+  if (TREE_CODE (ref) != COMPONENT_REF)
+    abort();
+#endif
+  ann = tree_annotation (TREE_OPERAND (ref, 1));
+  for (i = 0; i < num_component_ref (ref); i++)
+    {
+      if (cref_equal_p (component_ref (ref, i), ref))	
+	return i;
+    }
+  return -1;
+}
+
+static inline int
+num_component_ref (ref)
+     tree ref;
+{
+  tree_ann ann;
+#if ENABLE_CHECKING
+  if (TREE_CODE (ref) != COMPONENT_REF && TREE_CODE (ref) != FIELD_DECL)
+    abort();
+#endif
+  if (TREE_CODE (ref) == FIELD_DECL)
+    ann = tree_annotation (ref);
+  else
+    ann = tree_annotation (TREE_OPERAND (ref, 1));
+  if (!ann || !ann->component_ref)
+    return 0;
+
+  return VARRAY_ACTIVE_SIZE (ann->component_ref);
+}
+
+    
+static inline void
+add_component_ref (cref)
+     tree cref;
+{
+  tree_ann ann;
+#if defined ENABLE_CHECKING
+  if (TREE_CODE (cref) != COMPONENT_REF)
+    abort ();
+#endif
+  ann = tree_annotation (TREE_OPERAND (cref, 1));
+  ann = ann ? ann : create_tree_ann (TREE_OPERAND (cref, 1));
+  if (!ann->component_ref)
+    VARRAY_GENERIC_PTR_INIT (ann->component_ref, 1, "component refs");
+  VARRAY_PUSH_GENERIC_PTR (ann->component_ref, cref);
+}
 
 static inline tree
 indirect_var (ptr)
      tree ptr;
 {
 #if defined ENABLE_CHECKING
-  if (!DECL_P (ptr)
+  if ((!DECL_P (ptr)
+       && TREE_CODE (ptr) != COMPONENT_REF)
       || !POINTER_TYPE_P (TREE_TYPE (ptr)))
     abort ();
 #endif
@@ -340,7 +444,8 @@ set_indirect_var (ptr, indirect)
 {
   tree_ann ann;
 #if defined ENABLE_CHECKING
-  if (!DECL_P (ptr)
+  if ((!DECL_P (ptr)
+       && TREE_CODE (ptr) != COMPONENT_REF)
       || !POINTER_TYPE_P (TREE_TYPE (ptr))
       || TREE_CODE (indirect) != INDIRECT_REF)
     abort ();
 
Index: tree-flow.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-flow.h,v
retrieving revision 1.1.4.36
diff -u -3 -p -r1.1.4.36 tree-flow.h
--- tree-flow.h	13 Nov 2002 21:04:39 -0000	1.1.4.36
+++ tree-flow.h	21 Nov 2002 03:15:12 -0000
@@ -176,7 +176,7 @@ struct var_ref_d GTY(())
      reference.  This array is setup so that the Ith entry corresponds to
      the Ith alias of the variable associated to this reference (i.e., this
      is the Ith entry of the array MAY_ALIASES in struct tree_ann_d).  */
-  union tree_ref_d ** GTY((length ("VARRAY_SIZE (%h.common.var->common.ann->may_aliases)"))) alias_imm_rdefs;
+  union tree_ref_d ** GTY((length ("%h.common.var->common.ann ? VARRAY_SIZE (%h.common.var->common.ann->may_aliases) : 0"))) alias_imm_rdefs;
 };
 
 /* Variable definitions.  */
@@ -232,7 +232,7 @@ struct var_phi_d GTY(())
   /* Array of PHI arguments.  The number of arguments to a PHI node is the
      number of incoming edges to the basic block where that PHI node
      resides.  Each member of the array is of type phi_node_arg.  */
-  varray_type phi_args;
+  varray_type GTY((param_is (struct phi_node_arg_d))) phi_args;
 };
 
 /* Variable uses.  */
@@ -307,7 +307,7 @@ struct expr_phi_d GTY(())
   struct expr_ref_common common;
   
   /* Expression PHI operands.*/
-  varray_type phi_args;
+  varray_type GTY((param_is (struct phi_node_arg_d))) phi_args;
 
   /* SSAPRE: True if PHI is downsafe.  */
   unsigned int downsafe:1;
@@ -491,12 +491,14 @@ struct tree_ann_d GTY(())
      See the rationale for this in the handler for INDIRECT_REF nodes in
      find_refs_in_expr.  */
   tree indirect_var;
+ 
+  varray_type GTY((param_is (union tree_node))) component_ref;
 
   /* Flags used to mark optimization-dependent state.  See TF_* below.  */
   HOST_WIDE_INT flags;
 
   /* Set of variables that may be aliases of this variable.  */
-  varray_type may_aliases;
+  varray_type GTY ((skip (""))) may_aliases;
 };
 
 typedef struct tree_ann_d *tree_ann;
@@ -511,7 +513,9 @@ enum tree_flags
   TF_REFERENCED		= 1 << 1,
 
   /* This expression is necessary (not dead code).  */
-  TF_NECESSARY		= 1 << 2
+  TF_NECESSARY		= 1 << 2,
+  
+  TF_DEFINED = 1 << 3
 };
 
 static inline tree_ann tree_annotation	PARAMS ((tree));
@@ -528,7 +532,11 @@ static inline enum tree_flags tree_flags
 static inline void reset_tree_flags	PARAMS ((tree));
 static inline tree indirect_var		PARAMS ((tree));
 static inline void set_indirect_var	PARAMS ((tree, tree));
-static inline tree create_indirect_ref	PARAMS ((tree));
+static inline tree create_indirect_ref PARAMS ((tree));
+static inline tree component_ref	PARAMS ((tree, unsigned int));
+static inline int get_component_ref_index PARAMS ((tree));
+static inline int num_component_ref     PARAMS ((tree));
+static inline void add_component_ref	PARAMS ((tree));
 static inline tree may_alias		PARAMS ((tree, size_t));
 static inline size_t num_may_alias	PARAMS ((tree));
 static inline int get_lineno		PARAMS ((tree));
@@ -625,13 +633,22 @@ extern GTY(()) tree global_var;
 
 /* Accessors for the referenced_vars array.  */
 extern unsigned long num_referenced_vars;
-
+	       
+extern varray_type defined_vars;	       
+extern unsigned long num_defined_vars;
 static inline tree referenced_var PARAMS ((size_t));
 static inline tree
 referenced_var (i)
      size_t i;
 {
   return VARRAY_TREE (referenced_vars, i);
+}
+static inline tree defined_var PARAMS ((size_t));
+static inline tree
+defined_var (i)
+     size_t i;
+{
+  return VARRAY_TREE (defined_vars, i);
 }
 
 
Index: tree-ssa-ccp.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-ccp.c,v
retrieving revision 1.1.2.32
diff -u -3 -p -r1.1.2.32 tree-ssa-ccp.c
--- tree-ssa-ccp.c	13 Nov 2002 21:04:39 -0000	1.1.2.32
+++ tree-ssa-ccp.c	21 Nov 2002 03:15:12 -0000
@@ -499,12 +499,21 @@ visit_assignment (stmt)
      the constant value into the type of the destination variable.  This
      should not be necessary if GCC represented bitfields properly.  */
   {
-    tree lhs = TREE_OPERAND (stmt, 0);
+    tree lhs = stmt;
+    STRIP_WFL (lhs);
+    STRIP_NOPS (lhs);
+    lhs = TREE_OPERAND (lhs, 0);
+    STRIP_WFL (lhs);
+    STRIP_NOPS (lhs);
     if (val.lattice_val == CONSTANT
 	&& TREE_CODE (lhs) == COMPONENT_REF
 	&& DECL_BIT_FIELD (TREE_OPERAND (lhs, 1)))
       {
-	tree w = widen_bitfield (val.const_value, TREE_OPERAND (lhs, 1), lhs);
+        tree realval = val.const_value;
+	tree w = NULL;
+	STRIP_NOPS (realval);
+	if (TREE_CODE_CLASS (TREE_CODE (realval)) == 'c')
+	  w = widen_bitfield (realval, TREE_OPERAND (lhs, 1), lhs);
 
 	if (w)
 	  val.const_value = w;
Index: tree-ssa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa.c,v
retrieving revision 1.1.4.32
diff -u -3 -p -r1.1.4.32 tree-ssa.c
--- tree-ssa.c	13 Nov 2002 21:04:39 -0000	1.1.4.32
+++ tree-ssa.c	21 Nov 2002 03:15:14 -0000
@@ -976,8 +976,9 @@ init_tree_ssa ()
   memset ((void *) &dfa_counts, 0, sizeof (struct dfa_counts_d));
   
   num_referenced_vars = 0;
+  num_defined_vars = 0;
   VARRAY_TREE_INIT (referenced_vars, 20, "referenced_vars");
-
+  VARRAY_TREE_INIT (defined_vars, 20, "defined vars");
   /* Declare an artificial global variable to act as a representative of
      all the variables that may be clobbered by function calls.  */
   global_var = build_decl (VAR_DECL, get_identifier (".GLOBAL_VAR"),
@@ -1009,16 +1010,25 @@ delete_tree_ssa (fnbody)
      tree fnbody;
 {
   unsigned long int i;
-
+  basic_block bb;
+  
   /* Remove annotations from every tree in the function.  */
   walk_tree (&fnbody, remove_annotations_r, NULL, NULL);
 
   /* Remove annotations from every referenced variable.  */
   for (i = 0; i < num_referenced_vars; i++)
     referenced_var (i)->common.ann = NULL;
-
+  
+  FOR_EACH_BB (bb)
+  {
+    empty_ref_list (bb_refs (bb));
+  }
   num_referenced_vars = 0;
+  num_defined_vars = 0;
   referenced_vars = NULL;
+  defined_vars = NULL;
+  if (global_var)
+    global_var->common.ann = NULL;
   global_var = NULL_TREE;
 }
 
Index: alias.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/alias.c,v
retrieving revision 1.176.2.4
diff -u -3 -p -r1.176.2.4 alias.c
--- alias.c	22 Oct 2002 18:28:04 -0000	1.176.2.4
+++ alias.c	21 Nov 2002 03:27:18 -0000
@@ -104,7 +104,7 @@ static alias_set_entry get_alias_set_ent
 static rtx fixed_scalar_and_varying_struct_p PARAMS ((rtx, rtx, rtx, rtx,
 						      int (*) (rtx, int)));
 static int aliases_everything_p         PARAMS ((rtx));
-static bool nonoverlapping_component_refs_p PARAMS ((tree, tree));
+bool nonoverlapping_component_refs_p PARAMS ((tree, tree));
 static tree decl_for_component_ref	PARAMS ((tree));
 static rtx adjust_offset_for_component_ref PARAMS ((tree, rtx));
 static int nonoverlapping_memrefs_p	PARAMS ((rtx, rtx));
@@ -1823,7 +1823,7 @@ aliases_everything_p (mem)
 /* Return true if we can determine that the fields referenced cannot
    overlap for any pair of objects.  */
 
-static bool
+bool
 nonoverlapping_component_refs_p (x, y)
      tree x, y;
 {
Index: tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.h,v
retrieving revision 1.342.2.25
diff -u -3 -p -r1.342.2.25 tree.h
--- tree.h	5 Nov 2002 23:50:39 -0000	1.342.2.25
+++ tree.h	21 Nov 2002 03:27:19 -0000
@@ -2988,6 +2988,7 @@ extern void record_component_aliases		PA
 extern HOST_WIDE_INT get_alias_set		PARAMS ((tree));
 extern int alias_sets_conflict_p		PARAMS ((HOST_WIDE_INT,
 							 HOST_WIDE_INT));
+extern bool nonoverlapping_component_refs_p      PARAMS ((tree, tree));
 extern int readonly_fields_p			PARAMS ((tree));
 extern int objects_must_conflict_p		PARAMS ((tree, tree));
 


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