OSDN Git Service

2010-04-07 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Apr 2010 13:08:24 +0000 (13:08 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 05:17:24 +0000 (14:17 +0900)
* doc/invoke.texi (-fargument-alias, -fargument-noalias,
-fargument-noalias-global, -fargument-noalias-anything): Remove.
* common.opt: Likewise.
* tree-ssa-structalias.c (intra_create_variable_infos): Adjust
comment.
* alias.c (base_alias_check): Remove flag_argument_noalias
handling.
(nonoverlapping_memrefs_p): Likewise.
* emit-rtl.c (set_mem_attributes_minus_bitpos): Likewise.
* opts.c (common_handle_option): Handle OPT_fargument_alias,
OPT_fargument_noalias, OPT_fargument_noalias_anything and
OPT_fargument_noalias_global for backward compatibility.

fortran/
* options.c (gfc_init_options): Do not set.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158060 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/alias.c
gcc/emit-rtl.c
gcc/fortran/ChangeLog
gcc/fortran/options.c

index ff95657..edfd327 100644 (file)
@@ -1,5 +1,20 @@
 2010-04-07  Richard Guenther  <rguenther@suse.de>
 
+       * doc/invoke.texi (-fargument-alias, -fargument-noalias,
+       -fargument-noalias-global, -fargument-noalias-anything): Remove.
+       * common.opt: Likewise.
+       * tree-ssa-structalias.c (intra_create_variable_infos): Adjust
+       comment.
+       * alias.c (base_alias_check): Remove flag_argument_noalias
+       handling.
+       (nonoverlapping_memrefs_p): Likewise.
+       * emit-rtl.c (set_mem_attributes_minus_bitpos): Likewise.
+       * opts.c (common_handle_option): Handle OPT_fargument_alias,
+       OPT_fargument_noalias, OPT_fargument_noalias_anything and
+       OPT_fargument_noalias_global for backward compatibility.
+
+2010-04-07  Richard Guenther  <rguenther@suse.de>
+
        PR tree-optimization/43270
        * tree-vrp.c (check_array_ref): Fix flexible array member
        detection.
index a4083a1..1d69d9d 100644 (file)
@@ -2196,21 +2196,43 @@ nonoverlapping_memrefs_p (const_rtx x, const_rtx y)
   moffsetx = MEM_OFFSET (x);
   if (TREE_CODE (exprx) == COMPONENT_REF)
     {
-      tree t = decl_for_component_ref (exprx);
-      if (! t)
-       return 0;
-      moffsetx = adjust_offset_for_component_ref (exprx, moffsetx);
-      exprx = t;
+      if (TREE_CODE (expry) == VAR_DECL
+         && POINTER_TYPE_P (TREE_TYPE (expry)))
+       {
+        tree field = TREE_OPERAND (exprx, 1);
+        tree fieldcontext = DECL_FIELD_CONTEXT (field);
+        if (ipa_type_escape_field_does_not_clobber_p (fieldcontext,
+                                                      TREE_TYPE (field)))
+          return 1;
+       }
+      {
+       tree t = decl_for_component_ref (exprx);
+       if (! t)
+         return 0;
+       moffsetx = adjust_offset_for_component_ref (exprx, moffsetx);
+       exprx = t;
+      }
     }
 
   moffsety = MEM_OFFSET (y);
   if (TREE_CODE (expry) == COMPONENT_REF)
     {
-      tree t = decl_for_component_ref (expry);
-      if (! t)
-       return 0;
-      moffsety = adjust_offset_for_component_ref (expry, moffsety);
-      expry = t;
+      if (TREE_CODE (exprx) == VAR_DECL
+         && POINTER_TYPE_P (TREE_TYPE (exprx)))
+       {
+        tree field = TREE_OPERAND (expry, 1);
+        tree fieldcontext = DECL_FIELD_CONTEXT (field);
+        if (ipa_type_escape_field_does_not_clobber_p (fieldcontext,
+                                                      TREE_TYPE (field)))
+          return 1;
+       }
+      {
+       tree t = decl_for_component_ref (expry);
+       if (! t)
+         return 0;
+       moffsety = adjust_offset_for_component_ref (expry, moffsety);
+       expry = t;
+      }
     }
 
   if (! DECL_P (exprx) || ! DECL_P (expry))
index b5c4185..e0acc0c 100644 (file)
@@ -1782,15 +1782,6 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp,
                 the size we got from the type?  */
            }
 
-         else if (flag_argument_noalias > 1
-                  && (INDIRECT_REF_P (t2))
-                  && TREE_CODE (TREE_OPERAND (t2, 0)) == PARM_DECL)
-           {
-             expr = t;
-             offset = const0_rtx;
-             apply_bitpos = bitpos;
-           }
-
          /* If this is an indirect reference, record it.  */
          else if (TREE_CODE (t) == INDIRECT_REF
                   || TREE_CODE (t) == MISALIGNED_INDIRECT_REF)
@@ -1810,15 +1801,6 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp,
          apply_bitpos = bitpos;
        }
 
-      /* If this is an indirect reference, record it.  */
-      else if (TREE_CODE (t) == INDIRECT_REF
-              || TREE_CODE (t) == MISALIGNED_INDIRECT_REF)
-       {
-         expr = t;
-         offset = const0_rtx;
-         apply_bitpos = bitpos;
-       }
-
       if (!align_computed && !INDIRECT_REF_P (t))
        {
          unsigned int obj_align
index 9725d8e..2b1aa30 100644 (file)
@@ -1,3 +1,7 @@
+2010-04-07  Richard Guenther  <rguenther@suse.de>
+
+       * options.c (gfc_init_options): Do not set.
+
 2010-04-06  Tobias Burnus  <burnus@net-b.de>
 
        PR fortran/18918
index a91ba93..6a5a3db 100644 (file)
@@ -132,9 +132,6 @@ gfc_init_options (unsigned int argc, const char **argv)
   gfc_option.rtcheck = 0;
   gfc_option.coarray = GFC_FCOARRAY_NONE;
 
-  /* Argument pointers cannot point to anything but their argument.  */
-  flag_argument_noalias = 3;
-
   flag_errno_math = 0;
 
   set_default_std_flags ();