tree-ssa-structalias.c (merge_smts_into): Remove.
authorRichard Guenther <rguenther@suse.de>
Fri, 6 Jun 2008 10:11:44 +0000 (10:11 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 6 Jun 2008 10:11:44 +0000 (10:11 +0000)
2008-06-06  Richard Guenther  <rguenther@suse.de>

* tree-ssa-structalias.c (merge_smts_into): Remove.
(find_what_p_points_to): Do not bother to compute the
points-to set for pt_anything pointers.
* tree-ssa-operands.c (get_addr_dereference_operands): No NMT
for pt_anything pointers is ok.

* gcc.dg/tree-ssa/alias-18.c: XFAIL some sub-tests.

From-SVN: r136428

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/alias-18.c
gcc/tree-ssa-operands.c
gcc/tree-ssa-structalias.c

index b20b53cf1f060aecf513d5ed80f9edcc292bff53..8ba854ef3bb4ea5990d0bfa24e599181c6517ac2 100644 (file)
@@ -1,3 +1,11 @@
+2008-06-06  Richard Guenther  <rguenther@suse.de>
+
+       * tree-ssa-structalias.c (merge_smts_into): Remove.
+       (find_what_p_points_to): Do not bother to compute the
+       points-to set for pt_anything pointers.
+       * tree-ssa-operands.c (get_addr_dereference_operands): No NMT
+       for pt_anything pointers is ok.
+
 2008-06-06  Jan Hubicka  <jh@suse.cz>
 
        * passes.c (execute_ipa_pass_list): Do not regenerate summaries.
index d8c177dcc57e6bdef573e7d9a8a47e8c4e09b022..fb43d809e49cd28b996165b808a6d4a22b184d2e 100644 (file)
@@ -1,3 +1,7 @@
+2008-06-06  Richard Guenther  <rguenther@suse.de>
+
+       * gcc.dg/tree-ssa/alias-18.c: XFAIL some sub-tests.
+
 2008-06-04  Joseph Myers  <joseph@codesourcery.com>
 
        * lib/target-supports.exp (check_effective_target_powerpc_spu):
index 9ef3f2aadb76be83b8409692dee2896b0cf338d4..84d884effb580ea02ff372472df3c9c0b123ccf9 100644 (file)
@@ -78,10 +78,10 @@ int test8 (struct A *p, int *q)
 
 /* { dg-final { scan-tree-dump "with 0" "fre" } } */
 /* { dg-final { scan-tree-dump "with 1" "fre" { xfail *-*-* } } } */
-/* { dg-final { scan-tree-dump "with 3" "fre" } } */
+/* { dg-final { scan-tree-dump "with 3" "fre" { xfail *-*-* } } } */
 /* { dg-final { scan-tree-dump "with 4" "fre" } } */
 /* { dg-final { scan-tree-dump "with 5" "fre" } } */
-/* { dg-final { scan-tree-dump "with 8" "fre" } } */
+/* { dg-final { scan-tree-dump "with 8" "fre" { xfail *-*-* } } } */
 /* { dg-final { scan-tree-dump-not "return 2;" "optimized" } } */
 /* { dg-final { scan-tree-dump-not "return 6;" "optimized" } } */
 /* { dg-final { scan-tree-dump-not "return 7;" "optimized" } } */
index cdbc442a0ee5dab400576369214f9272fbd1252a..102ed5af3d47f51308d8789dce7ef50e0125190d 100644 (file)
@@ -1523,7 +1523,8 @@ get_addr_dereference_operands (tree stmt, tree *addr, int flags, tree full_ref,
          if (dump_file
              && TREE_CODE (ptr) == SSA_NAME
              && (pi == NULL
-                 || pi->name_mem_tag == NULL_TREE))
+                 || (pi->name_mem_tag == NULL_TREE
+                     && !pi->pt_anything)))
            {
              fprintf (dump_file,
                  "NOTE: no flow-sensitive alias info for ");
index 570c173b3a949de24149a6d9d8178714458a0cb8..d66a4a82239682432f0b6715f31227c3f79cdfe1 100644 (file)
@@ -4721,32 +4721,6 @@ set_used_smts (void)
     }
 }
 
-/* Merge the necessary SMT's into the bitmap INTO, which is
-   P's varinfo.  This involves merging all SMT's that are a subset of
-   the SMT necessary for P. */
-
-static void
-merge_smts_into (tree p, bitmap solution)
-{
-  tree smt;
-  bitmap aliases;
-  tree var = p;
-
-  if (TREE_CODE (p) == SSA_NAME)
-    var = SSA_NAME_VAR (p);
-
-  smt = var_ann (var)->symbol_mem_tag;
-  if (smt)
-    {
-      /* The smt itself isn't included in its aliases.  */
-      bitmap_set_bit (solution, DECL_UID (smt));
-
-      aliases = MTAG_ALIASES (smt);
-      if (aliases)
-       bitmap_ior_into (solution, aliases);
-    }
-}
-
 /* Given a pointer variable P, fill in its points-to set, or return
    false if we can't.
    Rather than return false for variables that point-to anything, we
@@ -4828,19 +4802,18 @@ find_what_p_points_to (tree p)
                }
            }
 
+         /* Instead of doing extra work, simply do not create
+            points-to information for pt_anything pointers.  This
+            will cause the operand scanner to fall back to the
+            type-based SMT and its aliases.  Which is the best
+            we could do here for the points-to set as well.  */
+         if (was_pt_anything)
+           return false;
+
          /* Share the final set of variables when possible.  */
          finished_solution = BITMAP_GGC_ALLOC ();
          stats.points_to_sets_created++;
 
-         /* Instead of using pt_anything, we merge in the SMT aliases
-            for the underlying SMT.  In addition, if they could have
-            pointed to anything, they could point to global memory.  */
-         if (was_pt_anything)
-           {
-             merge_smts_into (p, finished_solution);
-             pi->pt_global_mem = 1;
-           }
-
          set_uids_in_ptset (p, finished_solution, vi->solution,
                             vi->directly_dereferenced,
                             vi->no_tbaa_pruning);