tree-ssa-structalias.c (need_to_solve): Need to check for preds, too.
authorDaniel Berlin <dberlin@dberlin.org>
Sat, 16 Jul 2005 22:27:21 +0000 (22:27 +0000)
committerDaniel Berlin <dberlin@gcc.gnu.org>
Sat, 16 Jul 2005 22:27:21 +0000 (22:27 +0000)
2005-07-16  Daniel Berlin  <dberlin@dberlin.org>

* tree-ssa-structalias.c (need_to_solve): Need to check for preds,
too.

From-SVN: r102100

gcc/ChangeLog
gcc/tree-ssa-structalias.c

index 5ead4550bda102ad427ad39a847dc69fc022249e..d608e19096adc11bb507e467b131d238a70a2182 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-16  Daniel Berlin  <dberlin@dberlin.org>
+
+       * tree-ssa-structalias.c (need_to_solve): Need to check for preds,
+       too.
+
 2005-07-16  Eric Botcazou <ebotcazou@libertysurf.fr>
 
        * doc/install.texi (*-*-solaris2*): Document recommended version
index cb45a8cc83c3ed51974d9e104550a7eb088e8c07..f715ce7abb903806e7506dcd83d58b876c649399 100644 (file)
@@ -3494,7 +3494,8 @@ init_base_vars (void)
 /* Return true if we actually need to solve the constraint graph in order to
    get our points-to sets.  This is false when, for example, no addresses are
    taken other than special vars, or all points-to sets with members already
-   contain the anything variable.  */
+   contain the anything variable and there are no predecessors for other
+   sets.  */
 
 static bool
 need_to_solve (void)
@@ -3516,6 +3517,9 @@ need_to_solve (void)
          && !bitmap_empty_p (v->solution) 
          && !bitmap_bit_p (v->solution, anything_id))
        found_non_anything = true;
+      else if (bitmap_empty_p (v->solution)
+              && VEC_length (constraint_edge_t, graph->preds[v->id]) != 0)
+       found_non_anything = true;
 
       if (found_address_taken && found_non_anything)
        return true;