Commit 1e6a7b01 by Tom de Vries Committed by Tom de Vries

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
parent 383ec9fd
2015-07-27 Tom de Vries <tom@codesourcery.com>
* tree-parloops.c (gather_scalar_reductions): Simplify function
structure.
2015-07-27 Marek Polacek <polacek@redhat.com> 2015-07-27 Marek Polacek <polacek@redhat.com>
* ipa-devirt.c (types_same_for_odr): Fix typo. * ipa-devirt.c (types_same_for_odr): Fix typo.
......
...@@ -2370,6 +2370,8 @@ gather_scalar_reductions (loop_p loop, reduction_info_table_type *reduction_list ...@@ -2370,6 +2370,8 @@ gather_scalar_reductions (loop_p loop, reduction_info_table_type *reduction_list
loop_vec_info simple_loop_info; loop_vec_info simple_loop_info;
simple_loop_info = vect_analyze_loop_form (loop); 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)) 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 ...@@ -2381,15 +2383,16 @@ gather_scalar_reductions (loop_p loop, reduction_info_table_type *reduction_list
if (virtual_operand_p (res)) if (virtual_operand_p (res))
continue; continue;
if (!simple_iv (loop, loop, res, &iv, true) if (simple_iv (loop, loop, res, &iv, true))
&& simple_loop_info) continue;
{
gimple reduc_stmt gimple reduc_stmt
= vect_force_simple_reduction (simple_loop_info, phi, true, = vect_force_simple_reduction (simple_loop_info, phi, true,
&double_reduc, true); &double_reduc, true);
if (reduc_stmt && !double_reduc) if (!reduc_stmt || double_reduc)
build_new_reduction (reduction_list, reduc_stmt, phi); continue;
}
build_new_reduction (reduction_list, reduc_stmt, phi);
} }
destroy_loop_vec_info (simple_loop_info, true); destroy_loop_vec_info (simple_loop_info, true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment