tree-ssa.c (verify_flow_sensitive_alias_info): Don't retrieve annotations or pointer...
authorJeff Law <law@redhat.com>
Fri, 26 Nov 2004 20:18:34 +0000 (13:18 -0700)
committerJeff Law <law@gcc.gnu.org>
Fri, 26 Nov 2004 20:18:34 +0000 (13:18 -0700)
        * tree-ssa.c (verify_flow_sensitive_alias_info): Don't
        retrieve annotations or pointer info before it's necessary.
        Reorder tests for early continue of the loop.  Manually CSE
        SSA_NAME_VAR.

From-SVN: r91347

gcc/ChangeLog
gcc/tree-ssa.c

index 0ac278bfb69a37db9799de312c2840a243bc82c4..c3d7358c4fa3043dc3077c51624777a8b9dcc78d 100644 (file)
@@ -1,3 +1,10 @@
+2004-11-26  Jeff Law  <law@redhat.com>
+
+       * tree-ssa.c (verify_flow_sensitive_alias_info): Don't
+       retrieve annotations or pointer info before it's necessary.
+       Reorder tests for early continue of the loop.  Manually CSE
+       SSA_NAME_VAR.
+
 2004-11-26  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        * target.h (struct gcc_target): New field 'dwarf_handle_frame_unspec'.
index 8e2e0982cded4b3e69cde596f922858341a5daa2..4aa8b26cc46a8de112497eba26cceabaa8719585 100644 (file)
@@ -404,31 +404,34 @@ verify_flow_sensitive_alias_info (void)
 
   for (i = 1; i < num_ssa_names; i++)
     {
+      tree var;
       var_ann_t ann;
       struct ptr_info_def *pi;
 
       ptr = ssa_name (i);
       if (!ptr)
        continue;
-      ann = var_ann (SSA_NAME_VAR (ptr));
-      pi = SSA_NAME_PTR_INFO (ptr);
 
       /* We only care for pointers that are actually referenced in the
         program.  */
-      if (!TREE_VISITED (ptr) || !POINTER_TYPE_P (TREE_TYPE (ptr)))
+      if (!POINTER_TYPE_P (TREE_TYPE (ptr)) || !TREE_VISITED (ptr))
        continue;
 
       /* RESULT_DECL is special.  If it's a GIMPLE register, then it
         is only written-to only once in the return statement.
         Otherwise, aggregate RESULT_DECLs may be written-to more than
         once in virtual operands.  */
-      if (TREE_CODE (SSA_NAME_VAR (ptr)) == RESULT_DECL
+      var = SSA_NAME_VAR (ptr);
+      if (TREE_CODE (var) == RESULT_DECL
          && is_gimple_reg (ptr))
        continue;
 
+      pi = SSA_NAME_PTR_INFO (ptr);
       if (pi == NULL)
        continue;
 
+      ann = var_ann (var);
       if (pi->is_dereferenced && !pi->name_mem_tag && !ann->type_mem_tag)
        {
          error ("Dereferenced pointers should have a name or a type tag");