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
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"
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;
+ }
+ }
}
}
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 */
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 */
+ }
};