OSDN Git Service

* tree-scalar-evolution.c (analyze_scalar_evolution_in_loop):
[pf3gnuchains/gcc-fork.git] / gcc / tree-ssa-alias.c
index 6155809..4dd4fb7 100644 (file)
@@ -1,5 +1,6 @@
 /* Alias analysis for trees.
-   Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009
+   Free Software Foundation, Inc.
    Contributed by Diego Novillo <dnovillo@redhat.com>
 
 This file is part of GCC.
@@ -1825,9 +1826,6 @@ compute_may_aliases (void)
        dump_referenced_vars (dump_file);
     }
 
-  /* Report strict aliasing violations.  */
-  strict_aliasing_warning_backend ();
-
   /* Deallocate memory used by aliasing data structures.  */
   delete_alias_info (ai);
 
@@ -2486,6 +2484,24 @@ update_alias_info_1 (gimple stmt, struct alias_info *ai)
   if (addr_taken)
     bitmap_ior_into (gimple_addressable_vars (cfun), addr_taken);
 
+  /* If we have a call or an assignment, see if the lhs contains
+     a local decl that requires not to be a gimple register.  */
+  if (gimple_code (stmt) == GIMPLE_ASSIGN
+      || gimple_code (stmt) == GIMPLE_CALL)
+    {
+      tree lhs = gimple_get_lhs (stmt);
+      /* A plain decl does not need it set.  */
+      if (lhs && handled_component_p (lhs))
+       {
+         tree var = get_base_address (lhs);
+         if (DECL_P (var)
+             /* We are not going to mess with RESULT_DECL anyway.  */
+             && TREE_CODE (var) != RESULT_DECL
+             && is_gimple_reg_type (TREE_TYPE (var)))
+           bitmap_set_bit (gimple_addressable_vars (cfun), DECL_UID (var));
+       }
+    }
+
   /* Process each operand use.  For pointers, determine whether they
      are dereferenced by the statement, or whether their value
      escapes, etc.  */