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] Simplify escape handling in PTA


As we now have a vi->is_global_var flag it's simpler.  Sub-fields also
never have different global state.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.

Richard.

2009-06-26  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-structalias.c (do_ds_constraint): Simplify escape
	handling.

Index: gcc/tree-ssa-structalias.c
===================================================================
--- gcc/tree-ssa-structalias.c	(revision 148947)
+++ gcc/tree-ssa-structalias.c	(working copy)
@@ -1643,8 +1643,8 @@ do_ds_constraint (constraint_t c, bitmap
       unsigned int t;
       HOST_WIDE_INT fieldoffset = v->offset + loff;
 
-      /* If v is a NONLOCAL then this is an escape point.  */
-      if (j == nonlocal_id)
+      /* If v is a global variable then this is an escape point.  */
+      if (v->is_global_var)
 	{
 	  t = find (escaped_id);
 	  if (add_graph_edge (graph, t, rhs)
@@ -1680,18 +1680,6 @@ do_ds_constraint (constraint_t c, bitmap
 		  changed_count++;
 		}
 	    }
-	  /* If v is a global variable then this is an escape point.  */
-	  if (v->is_global_var)
-	    {
-	      t = find (escaped_id);
-	      if (add_graph_edge (graph, t, rhs)
-		  && bitmap_ior_into (get_varinfo (t)->solution, sol)
-		  && !TEST_BIT (changed, t))
-		{
-		  SET_BIT (changed, t);
-		  changed_count++;
-		}
-	    }
 
 	  /* If the variable is not exactly at the requested offset
 	     we have to include the next one.  */


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