From: Bin Cheng Date: Thu, 13 Oct 2016 10:22:57 +0000 (+0000) Subject: tree-vect-loop-manip.c (slpeel_can_duplicate_loop_p): Fix code style issue. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=62fdbf29a32779122e7dc5ebef22ca0854f4f99a;p=gcc.git tree-vect-loop-manip.c (slpeel_can_duplicate_loop_p): Fix code style issue. * tree-vect-loop-manip.c (slpeel_can_duplicate_loop_p): Fix code style issue. (vect_do_peeling_for_loop_bound, vect_do_peeling_for_alignment): Remove useless code. From-SVN: r241092 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6b431037fc4..449a759f458 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2016-10-13 Bin Cheng + + * tree-vect-loop-manip.c (slpeel_can_duplicate_loop_p): Fix code + style issue. + (vect_do_peeling_for_loop_bound, vect_do_peeling_for_alignment): + Remove useless code. + 2016-10-13 Martin Liska PR tree-optimization/77943 diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c index a715fd931ce..e6c297c76fe 100644 --- a/gcc/tree-vect-loop-manip.c +++ b/gcc/tree-vect-loop-manip.c @@ -1003,9 +1003,9 @@ slpeel_can_duplicate_loop_p (const struct loop *loop, const_edge e) gimple_stmt_iterator loop_exit_gsi = gsi_last_bb (exit_e->src); unsigned int num_bb = loop->inner? 5 : 2; - /* All loops have an outer scope; the only case loop->outer is NULL is for - the function itself. */ - if (!loop_outer (loop) + /* All loops have an outer scope; the only case loop->outer is NULL is for + the function itself. */ + if (!loop_outer (loop) || loop->num_nodes != num_bb || !empty_block_p (loop->latch) || !single_exit (loop) @@ -1786,7 +1786,6 @@ vect_do_peeling_for_loop_bound (loop_vec_info loop_vinfo, struct loop *new_loop; edge update_e; basic_block preheader; - int loop_num; int max_iter; tree cond_expr = NULL_TREE; gimple_seq cond_expr_stmt_list = NULL; @@ -1797,8 +1796,6 @@ vect_do_peeling_for_loop_bound (loop_vec_info loop_vinfo, initialize_original_copy_tables (); - loop_num = loop->num; - new_loop = slpeel_tree_peel_loop_to_edge (loop, scalar_loop, single_exit (loop), &ratio_mult_vf_name, ni_name, false, @@ -1806,7 +1803,6 @@ vect_do_peeling_for_loop_bound (loop_vec_info loop_vinfo, cond_expr, cond_expr_stmt_list, 0, LOOP_VINFO_VECT_FACTOR (loop_vinfo)); gcc_assert (new_loop); - gcc_assert (loop_num == loop->num); slpeel_checking_verify_cfg_after_peeling (loop, new_loop); /* A guard that controls whether the new_loop is to be executed or skipped @@ -2053,8 +2049,6 @@ vect_do_peeling_for_alignment (loop_vec_info loop_vinfo, tree ni_name, initialize_original_copy_tables (); - gimple_seq stmts = NULL; - gsi_insert_seq_on_edge_immediate (loop_preheader_edge (loop), stmts); niters_of_prolog_loop = vect_gen_niters_for_prolog_loop (loop_vinfo, ni_name, &bound);