OSDN Git Service

2008-04-01 Rafael Espindola <espindola@google.com>
authorespindola <espindola@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 1 Apr 2008 18:40:16 +0000 (18:40 +0000)
committerespindola <espindola@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 1 Apr 2008 18:40:16 +0000 (18:40 +0000)
* tree-cfg.c (verify_expr): remove in_phi.
        (verify_stmt): Don't call walk_tree with verify_expr. Use
is_gimple_min_invariant instead of is_gimple_val.

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

gcc/ChangeLog
gcc/tree-cfg.c

index 444f342..358a8ef 100644 (file)
@@ -1,3 +1,9 @@
+2008-04-01  Rafael Espindola  <espindola@google.com>
+
+       * tree-cfg.c (verify_expr): remove in_phi.
+        (verify_stmt): Don't call walk_tree with verify_expr. Use
+       is_gimple_min_invariant instead of is_gimple_val.
+
 2008-04-01  Joseph Myers  <joseph@codesourcery.com>
 
        * doc/include/gpl_v3.texi: Update for manpage generation.
index 6c4b311..944b31f 100644 (file)
@@ -3113,7 +3113,6 @@ static tree
 verify_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
 {
   tree t = *tp, x;
-  bool in_phi = (data != NULL);
 
   if (TYPE_P (t))
     *walk_subtrees = 0;
@@ -3164,23 +3163,6 @@ verify_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
        bool new_constant;
        bool new_side_effects;
 
-        /* ??? tree-ssa-alias.c may have overlooked dead PHI nodes, missing
-          dead PHIs that take the address of something.  But if the PHI
-          result is dead, the fact that it takes the address of anything
-          is irrelevant.  Because we can not tell from here if a PHI result
-          is dead, we just skip this check for PHIs altogether.  This means
-          we may be missing "valid" checks, but what can you do?
-          This was PR19217.  */
-        if (in_phi)
-         {
-           if (!is_gimple_min_invariant (t))
-             {
-               error ("non-invariant address expression in PHI argument");
-               return t;
-             }
-           break;
-         }
-
        old_invariant = TREE_INVARIANT (t);
        old_constant = TREE_CONSTANT (t);
        old_side_effects = TREE_SIDE_EFFECTS (t);
@@ -4338,7 +4320,7 @@ verify_stmts (void)
                 are not considered gimple values.  */
              else if (TREE_CODE (t) != SSA_NAME
                       && TREE_CODE (t) != FUNCTION_DECL
-                      && !is_gimple_val (t))
+                      && !is_gimple_min_invariant (t))
                {
                  error ("PHI def is not a GIMPLE value");
                  debug_generic_stmt (phi);
@@ -4346,13 +4328,6 @@ verify_stmts (void)
                  err |= true;
                }
 
-             addr = walk_tree (&t, verify_expr, (void *) 1, NULL);
-             if (addr)
-               {
-                 debug_generic_stmt (addr);
-                 err |= true;
-               }
-
              addr = walk_tree (&t, verify_node_sharing, visited, NULL);
              if (addr)
                {