OSDN Git Service

* config/i386/i386.md (absneg): New code iterator.
[pf3gnuchains/gcc-fork.git] / gcc / tree-ssa-loop-ch.c
index 570ad26..47b93f8 100644 (file)
@@ -5,7 +5,7 @@ This file is part of GCC.
    
 GCC is free software; you can redistribute it and/or modify it
 under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 2, or (at your option) any
+Free Software Foundation; either version 3, or (at your option) any
 later version.
    
 GCC is distributed in the hope that it will be useful, but WITHOUT
@@ -14,9 +14,8 @@ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 for more details.
    
 You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING.  If not, write to the Free
-Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301, USA.  */
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
 
 #include "config.h"
 #include "system.h"
@@ -216,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;
+                   }
+               }
            }
        }
 
@@ -243,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 */
@@ -257,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 */
+ }
 };