diff options
author | Tom de Vries <tom@codesourcery.com> | 2015-07-27 20:05:19 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2015-07-27 20:05:19 +0000 |
commit | 1e6a7b01cca0a8efeeb0c6f008ab03098cfd5dce (patch) | |
tree | a1b958182b0bb2fb2242fe122e48bc7a5fc403a9 /gcc/tree-parloops.c | |
parent | 383ec9fd778e0bdbfb532d7d0797d0e0fe3fc317 (diff) |
Simplify gather_scalar_reductions
2015-07-27 Tom de Vries <tom@codesourcery.com>
* tree-parloops.c (gather_scalar_reductions): Simplify function
structure.
From-SVN: r226270
Diffstat (limited to 'gcc/tree-parloops.c')
-rw-r--r-- | gcc/tree-parloops.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c index 6e75cb13648..daf23f2532b 100644 --- a/gcc/tree-parloops.c +++ b/gcc/tree-parloops.c @@ -2370,6 +2370,8 @@ gather_scalar_reductions (loop_p loop, reduction_info_table_type *reduction_list loop_vec_info simple_loop_info; simple_loop_info = vect_analyze_loop_form (loop); + if (simple_loop_info == NULL) + return; for (gsi = gsi_start_phis (loop->header); !gsi_end_p (gsi); gsi_next (&gsi)) { @@ -2381,15 +2383,16 @@ gather_scalar_reductions (loop_p loop, reduction_info_table_type *reduction_list if (virtual_operand_p (res)) continue; - if (!simple_iv (loop, loop, res, &iv, true) - && simple_loop_info) - { - gimple reduc_stmt - = vect_force_simple_reduction (simple_loop_info, phi, true, - &double_reduc, true); - if (reduc_stmt && !double_reduc) - build_new_reduction (reduction_list, reduc_stmt, phi); - } + if (simple_iv (loop, loop, res, &iv, true)) + continue; + + gimple reduc_stmt + = vect_force_simple_reduction (simple_loop_info, phi, true, + &double_reduc, true); + if (!reduc_stmt || double_reduc) + continue; + + build_new_reduction (reduction_list, reduc_stmt, phi); } destroy_loop_vec_info (simple_loop_info, true); |