]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-ssa-structalias.c (set_uids_in_ptset): Use the pointed-to type for TBAA pruning.
authorRichard Guenther <rguenther@suse.de>
Thu, 15 Nov 2007 09:06:58 +0000 (09:06 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 15 Nov 2007 09:06:58 +0000 (09:06 +0000)
2007-11-15  Richard Guenther  <rguenther@suse.de>

* tree-ssa-structalias.c (set_uids_in_ptset): Use the pointed-to
type for TBAA pruning.
(find_what_p_points_to): Call set_uids_in_ptset with the original
pointer, not the decl of the solution we collapsed to.

From-SVN: r130195

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

index 308c9353426cec50ca1d73226d449e2c63b09db8..c9e518393be71f31b5fd9e6ca732b64e48abdeb1 100644 (file)
@@ -1,3 +1,10 @@
+2007-11-15  Richard Guenther  <rguenther@suse.de>
+
+       * tree-ssa-structalias.c (set_uids_in_ptset): Use the pointed-to
+       type for TBAA pruning.
+       (find_what_p_points_to): Call set_uids_in_ptset with the original
+       pointer, not the decl of the solution we collapsed to.
+
 2007-11-14  David Daney  <ddaney@avtrex.com>
 
        * config/mips/linux-unwind.h (mips_fallback_frame_state): Use CFA
index 479145ab6e9ab2ef7486df4c3e070b623b23b8fe..3820b1907cbedfc875ca1284b7102f7c3715bdbc 100644 (file)
@@ -4719,7 +4719,10 @@ set_uids_in_ptset (tree ptr, bitmap into, bitmap from, bool is_derefed,
 {
   unsigned int i;
   bitmap_iterator bi;
-  alias_set_type ptr_alias_set = get_alias_set (TREE_TYPE (ptr));
+  alias_set_type ptr_alias_set;
+
+  gcc_assert (POINTER_TYPE_P (TREE_TYPE (ptr)));
+  ptr_alias_set = get_alias_set (TREE_TYPE (TREE_TYPE (ptr)));
 
   EXECUTE_IF_SET_IN_BITMAP (from, 0, i, bi)
     {
@@ -4996,7 +4999,7 @@ find_what_p_points_to (tree p)
              pi->pt_global_mem = 1;
            }
 
-         set_uids_in_ptset (vi->decl, finished_solution, vi->solution,
+         set_uids_in_ptset (p, finished_solution, vi->solution,
                             vi->directly_dereferenced,
                             vi->no_tbaa_pruning);
          result = shared_bitmap_lookup (finished_solution);