Mercurial > hg > CbC > CbC_gcc
diff gcc/tree-ssa-loop-manip.c @ 67:f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author | nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 22 Mar 2011 17:18:12 +0900 |
parents | b7f97abdc517 |
children | 04ced10e8804 |
line wrap: on
line diff
--- a/gcc/tree-ssa-loop-manip.c Tue May 25 18:58:51 2010 +0900 +++ b/gcc/tree-ssa-loop-manip.c Tue Mar 22 17:18:12 2011 +0900 @@ -26,7 +26,6 @@ #include "tm_p.h" #include "basic-block.h" #include "output.h" -#include "diagnostic.h" #include "tree-flow.h" #include "tree-dump.h" #include "timevar.h" @@ -441,7 +440,7 @@ /* Checks that invariants of the loop closed ssa form are preserved. Call verify_ssa when VERIFY_SSA_P is true. */ -void +DEBUG_FUNCTION void verify_loop_closed_ssa (bool verify_ssa_p) { basic_block bb; @@ -456,6 +455,8 @@ if (verify_ssa_p) verify_ssa (false); + timevar_push (TV_VERIFY_LOOP_CLOSED); + FOR_EACH_BB (bb) { for (bsi = gsi_start_phis (bb); !gsi_end_p (bsi); gsi_next (&bsi)) @@ -469,6 +470,8 @@ for (bsi = gsi_start_bb (bb); !gsi_end_p (bsi); gsi_next (&bsi)) check_loop_closed_ssa_stmt (bb, gsi_stmt (bsi)); } + + timevar_pop (TV_VERIFY_LOOP_CLOSED); } /* Split loop exit edge EXIT. The things are a bit complicated by a need to @@ -1046,7 +1049,7 @@ free (wont_exit); gcc_assert (ok); - for (i = 0; VEC_iterate (edge, to_remove, i, e); i++) + FOR_EACH_VEC_ELT (edge, to_remove, i, e) { ok = remove_path (e); gcc_assert (ok); @@ -1082,7 +1085,7 @@ /* Finally create the new counter for number of iterations and add the new exit instruction. */ - bsi = gsi_last_bb (exit_bb); + bsi = gsi_last_nondebug_bb (exit_bb); exit_if = gsi_stmt (bsi); create_iv (exit_base, exit_step, NULL_TREE, loop, &bsi, false, &ctr_before, &ctr_after); @@ -1218,7 +1221,10 @@ gsi_insert_seq_on_edge_immediate (loop_preheader_edge (loop), stmts); } - gsi = gsi_last_bb (bump_in_latch ? loop->latch : loop->header); + if (bump_in_latch) + gsi = gsi_last_bb (loop->latch); + else + gsi = gsi_last_nondebug_bb (loop->header); create_iv (build_int_cst_type (type, 0), build_int_cst (type, 1), NULL_TREE, loop, &gsi, bump_in_latch, &var_before, NULL);