OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / gcc / tree-ssa.c
index 8485af0..08f908f 100644 (file)
@@ -925,8 +925,6 @@ verify_ssa (bool check_modified_stmt)
 
   gcc_assert (!need_ssa_update_p (cfun));
 
-  verify_gimple_in_cfg (cfun);
-
   timevar_push (TV_TREE_SSA_VERIFY);
 
   /* Keep track of SSA names present in the IL.  */
@@ -938,6 +936,8 @@ verify_ssa (bool check_modified_stmt)
          gimple stmt;
          TREE_VISITED (name) = 0;
 
+         verify_ssa_name (name, !is_gimple_reg (name));
+
          stmt = SSA_NAME_DEF_STMT (name);
          if (!gimple_nop_p (stmt))
            {
@@ -987,9 +987,6 @@ verify_ssa (bool check_modified_stmt)
        {
          gimple stmt = gsi_stmt (gsi);
          use_operand_p use_p;
-         bool has_err;
-         int count;
-         unsigned i;
 
          if (check_modified_stmt && gimple_modified_p (stmt))
            {
@@ -999,89 +996,15 @@ verify_ssa (bool check_modified_stmt)
              goto err;
            }
 
-         if (is_gimple_assign (stmt)
-             && TREE_CODE (gimple_assign_lhs (stmt)) != SSA_NAME)
-           {
-             tree lhs, base_address;
-
-             lhs = gimple_assign_lhs (stmt);
-             base_address = get_base_address (lhs);
-
-             if (base_address
-                 && SSA_VAR_P (base_address)
-                 && !gimple_vdef (stmt)
-                 && optimize > 0)
-               {
-                 error ("statement makes a memory store, but has no VDEFS");
-                 print_gimple_stmt (stderr, stmt, 0, TDF_VOPS);
-                 goto err;
-               }
-           }
-         else if (gimple_debug_bind_p (stmt)
-                  && !gimple_debug_bind_has_value_p (stmt))
-           continue;
-
-         /* Verify the single virtual operand and its constraints.  */
-         has_err = false;
-         if (gimple_vdef (stmt))
-           {
-             if (gimple_vdef_op (stmt) == NULL_DEF_OPERAND_P)
-               {
-                 error ("statement has VDEF operand not in defs list");
-                 has_err = true;
-               }
-             if (!gimple_vuse (stmt))
-               {
-                 error ("statement has VDEF but no VUSE operand");
-                 has_err = true;
-               }
-             else if (SSA_NAME_VAR (gimple_vdef (stmt))
-                      != SSA_NAME_VAR (gimple_vuse (stmt)))
-               {
-                 error ("VDEF and VUSE do not use the same symbol");
-                 has_err = true;
-               }
-             has_err |= verify_ssa_name (gimple_vdef (stmt), true);
-           }
-         if (gimple_vuse (stmt))
+         if (verify_ssa_operands (stmt))
            {
-             if  (gimple_vuse_op (stmt) == NULL_USE_OPERAND_P)
-               {
-                 error ("statement has VUSE operand not in uses list");
-                 has_err = true;
-               }
-             has_err |= verify_ssa_name (gimple_vuse (stmt), true);
-           }
-         if (has_err)
-           {
-             error ("in statement");
-             print_gimple_stmt (stderr, stmt, 0, TDF_VOPS|TDF_MEMSYMS);
+             print_gimple_stmt (stderr, stmt, 0, TDF_VOPS);
              goto err;
            }
 
-         count = 0;
-         FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_USE|SSA_OP_DEF)
-           {
-             if (verify_ssa_name (op, false))
-               {
-                 error ("in statement");
-                 print_gimple_stmt (stderr, stmt, 0, TDF_VOPS|TDF_MEMSYMS);
-                 goto err;
-               }
-             count++;
-           }
-
-         for (i = 0; i < gimple_num_ops (stmt); i++)
-           {
-             op = gimple_op (stmt, i);
-             if (op && TREE_CODE (op) == SSA_NAME && --count < 0)
-               {
-                 error ("number of operands and imm-links don%'t agree"
-                        " in statement");
-                 print_gimple_stmt (stderr, stmt, 0, TDF_VOPS|TDF_MEMSYMS);
-                 goto err;
-               }
-           }
+         if (gimple_debug_bind_p (stmt)
+             && !gimple_debug_bind_has_value_p (stmt))
+           continue;
 
          FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_USE|SSA_OP_VUSE)
            {
@@ -1274,10 +1197,6 @@ useless_type_conversion_p (tree outer_type, tree inner_type)
       if (TYPE_ADDR_SPACE (TREE_TYPE (outer_type))
          != TYPE_ADDR_SPACE (TREE_TYPE (inner_type)))
        return false;
-
-      /* If the outer type is (void *), the conversion is not necessary.  */
-      if (VOID_TYPE_P (TREE_TYPE (outer_type)))
-       return true;
     }
 
   /* From now on qualifiers on value types do not matter.  */