OSDN Git Service

* config/rs6000/rs6000.c (build_opaque_vector_type): Set
[pf3gnuchains/gcc-fork.git] / gcc / tree-ssa-loop-ch.c
index e895981..47b93f8 100644 (file)
@@ -215,11 +215,22 @@ copy_loop_headers (void)
 
          for (i = 0; i < n_bbs; ++i)
            {
-             tree last;
-
-             last = last_stmt (copied_bbs[i]);
-             if (TREE_CODE (last) == COND_EXPR)
-               TREE_NO_WARNING (last) = 1;
+             block_stmt_iterator bsi;
+
+             for (bsi = bsi_start (copied_bbs[i]);
+                  !bsi_end_p (bsi);
+                  bsi_next (&bsi))
+               {
+                 tree stmt = bsi_stmt (bsi);
+                 if (TREE_CODE (stmt) == COND_EXPR)
+                   TREE_NO_WARNING (stmt) = 1;
+                 else if (TREE_CODE (stmt) == GIMPLE_MODIFY_STMT)
+                   {
+                     tree rhs = GIMPLE_STMT_OPERAND (stmt, 1);
+                     if (COMPARISON_CLASS_P (rhs))
+                       TREE_NO_WARNING (stmt) = 1;
+                   }
+               }
            }
        }
 
@@ -242,8 +253,10 @@ gate_ch (void)
   return flag_tree_ch != 0;
 }
 
-struct tree_opt_pass pass_ch = 
+struct gimple_opt_pass pass_ch = 
 {
+ {
+  GIMPLE_PASS,
   "ch",                                        /* name */
   gate_ch,                             /* gate */
   copy_loop_headers,                   /* execute */
@@ -256,6 +269,6 @@ struct tree_opt_pass pass_ch =
   0,                                   /* properties_destroyed */
   0,                                   /* todo_flags_start */
   TODO_cleanup_cfg | TODO_dump_func 
-  | TODO_verify_ssa,                   /* todo_flags_finish */
-  0                                    /* letter */
+  | TODO_verify_ssa                    /* todo_flags_finish */
+ }
 };