Commit 60555ced by Dorit Nuzman Committed by Dorit Nuzman

tree-vect-analyze.c (vect_analyze_operations): Reorganize calls to vectorizable_* functions.

        * tree-vect-analyze.c (vect_analyze_operations): Reorganize calls to
        vectorizable_* functions.
        * tree-vect-transform.c (vectorizable_call): Add check for
        STMT_VINFO_RELEVANT_P, STMT_VINFO_DEF_TYPE and STMT_VINFO_LIVE_P.
        (vectorizable_store): likewise.
        (vectorizable_conversion): Add check for STMT_VINFO_DEF_TYPE.
        Add comments.
        (vectorizable_operation, vectorizable_type_demotion): Likewise.
        (vectorizable_type_promotion, vectorizable_load): Likewise.
        (vectorizable_live_operation, vectorizable_condition): Likewise.
        (vectorizable_assignment): Add check for STMT_VINFO_DEF_TYPE and
        STMT_VINFO_LIVE_P.
        (vect_transform_stmt): Reorganize calls to vectorizable_* functions.

From-SVN: r123861
parent 20280c6f
2007-04-16 Dorit Nuzman <dorit@il.ibm.com>
* tree-vect-analyze.c (vect_analyze_operations): Reorganize calls to
vectorizable_* functions.
* tree-vect-transform.c (vectorizable_call): Add check for
STMT_VINFO_RELEVANT_P, STMT_VINFO_DEF_TYPE and STMT_VINFO_LIVE_P.
(vectorizable_store): likewise.
(vectorizable_conversion): Add check for STMT_VINFO_DEF_TYPE.
Add comments.
(vectorizable_operation, vectorizable_type_demotion): Likewise.
(vectorizable_type_promotion, vectorizable_load): Likewise.
(vectorizable_live_operation, vectorizable_condition): Likewise.
(vectorizable_assignment): Add check for STMT_VINFO_DEF_TYPE and
STMT_VINFO_LIVE_P.
(vect_transform_stmt): Reorganize calls to vectorizable_* functions.
2007-04-15 Kazu Hirata <kazu@codesourcery.com> 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
* config/m68k/linux.h (FUNCTION_VALUE_REGNO_P): Use macros for * config/m68k/linux.h (FUNCTION_VALUE_REGNO_P): Use macros for
......
...@@ -325,8 +325,8 @@ vect_analyze_operations (loop_vec_info loop_vinfo) ...@@ -325,8 +325,8 @@ vect_analyze_operations (loop_vec_info loop_vinfo)
/* FORNOW: not yet supported. */ /* FORNOW: not yet supported. */
if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
fprintf (vect_dump, "not vectorized: value used after loop."); fprintf (vect_dump, "not vectorized: value used after loop.");
return false; return false;
} }
if (STMT_VINFO_RELEVANT (stmt_info) == vect_used_in_loop if (STMT_VINFO_RELEVANT (stmt_info) == vect_used_in_loop
&& STMT_VINFO_DEF_TYPE (stmt_info) != vect_induction_def) && STMT_VINFO_DEF_TYPE (stmt_info) != vect_induction_def)
...@@ -337,12 +337,16 @@ vect_analyze_operations (loop_vec_info loop_vinfo) ...@@ -337,12 +337,16 @@ vect_analyze_operations (loop_vec_info loop_vinfo)
fprintf (vect_dump, "not vectorized: unsupported pattern."); fprintf (vect_dump, "not vectorized: unsupported pattern.");
return false; return false;
} }
if (STMT_VINFO_RELEVANT_P (stmt_info))
need_to_vectorize = true;
} }
for (si = bsi_start (bb); !bsi_end_p (si); bsi_next (&si)) for (si = bsi_start (bb); !bsi_end_p (si); bsi_next (&si))
{ {
tree stmt = bsi_stmt (si); tree stmt = bsi_stmt (si);
stmt_vec_info stmt_info = vinfo_for_stmt (stmt); stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
enum vect_def_type relevance = STMT_VINFO_RELEVANT (stmt_info);
if (vect_print_dump_info (REPORT_DETAILS)) if (vect_print_dump_info (REPORT_DETAILS))
{ {
...@@ -367,55 +371,57 @@ vect_analyze_operations (loop_vec_info loop_vinfo) ...@@ -367,55 +371,57 @@ vect_analyze_operations (loop_vec_info loop_vinfo)
continue; continue;
} }
if (STMT_VINFO_RELEVANT_P (stmt_info)) switch (STMT_VINFO_DEF_TYPE (stmt_info))
{
gcc_assert (GIMPLE_STMT_P (stmt)
|| !VECTOR_MODE_P (TYPE_MODE (TREE_TYPE (stmt))));
gcc_assert (STMT_VINFO_VECTYPE (stmt_info));
ok = (vectorizable_type_promotion (stmt, NULL, NULL)
|| vectorizable_type_demotion (stmt, NULL, NULL)
|| vectorizable_conversion (stmt, NULL, NULL)
|| vectorizable_operation (stmt, NULL, NULL)
|| vectorizable_assignment (stmt, NULL, NULL)
|| vectorizable_load (stmt, NULL, NULL)
|| vectorizable_call (stmt, NULL, NULL)
|| vectorizable_store (stmt, NULL, NULL)
|| vectorizable_condition (stmt, NULL, NULL));
if (!ok)
{
if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
{
fprintf (vect_dump,
"not vectorized: relevant stmt not supported: ");
print_generic_expr (vect_dump, stmt, TDF_SLIM);
}
return false;
}
need_to_vectorize = true;
}
if (STMT_VINFO_LIVE_P (stmt_info))
{ {
ok = vectorizable_reduction (stmt, NULL, NULL); case vect_loop_def:
break;
case vect_reduction_def:
gcc_assert (relevance == vect_unused_in_loop);
break;
case vect_induction_def:
case vect_constant_def:
case vect_invariant_def:
case vect_unknown_def_type:
default:
gcc_unreachable ();
}
if (ok) if (STMT_VINFO_RELEVANT_P (stmt_info))
need_to_vectorize = true; {
else gcc_assert (GIMPLE_STMT_P (stmt)
ok = vectorizable_live_operation (stmt, NULL, NULL); || !VECTOR_MODE_P (TYPE_MODE (TREE_TYPE (stmt))));
gcc_assert (STMT_VINFO_VECTYPE (stmt_info));
need_to_vectorize = true;
}
if (!ok) ok = (vectorizable_type_promotion (stmt, NULL, NULL)
|| vectorizable_type_demotion (stmt, NULL, NULL)
|| vectorizable_conversion (stmt, NULL, NULL)
|| vectorizable_operation (stmt, NULL, NULL)
|| vectorizable_assignment (stmt, NULL, NULL)
|| vectorizable_load (stmt, NULL, NULL)
|| vectorizable_call (stmt, NULL, NULL)
|| vectorizable_store (stmt, NULL, NULL)
|| vectorizable_condition (stmt, NULL, NULL)
|| vectorizable_reduction (stmt, NULL, NULL));
/* Stmts that are (also) "live" (i.e. - that are used out of the loop)
need extra handling, except for vectorizable reductions. */
if (STMT_VINFO_LIVE_P (stmt_info)
&& STMT_VINFO_TYPE (stmt_info) != reduc_vec_info_type)
ok |= vectorizable_live_operation (stmt, NULL, NULL);
if (!ok)
{
if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
{ {
if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) fprintf (vect_dump, "not vectorized: stmt not supported: ");
{ print_generic_expr (vect_dump, stmt, TDF_SLIM);
fprintf (vect_dump,
"not vectorized: live stmt not supported: ");
print_generic_expr (vect_dump, stmt, TDF_SLIM);
}
return false;
} }
} return false;
}
} /* stmts in bb */ } /* stmts in bb */
} /* bbs */ } /* bbs */
......
...@@ -1816,6 +1816,20 @@ vectorizable_call (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt) ...@@ -1816,6 +1816,20 @@ vectorizable_call (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
int ncopies, j, nargs; int ncopies, j, nargs;
call_expr_arg_iterator iter; call_expr_arg_iterator iter;
if (!STMT_VINFO_RELEVANT_P (stmt_info))
return false;
if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_loop_def)
return false;
/* FORNOW: not yet supported. */
if (STMT_VINFO_LIVE_P (stmt_info))
{
if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "value used after loop.");
return false;
}
/* Is STMT a vectorizable call? */ /* Is STMT a vectorizable call? */
if (TREE_CODE (stmt) != GIMPLE_MODIFY_STMT) if (TREE_CODE (stmt) != GIMPLE_MODIFY_STMT)
return false; return false;
...@@ -1994,7 +2008,8 @@ vectorizable_conversion (tree stmt, block_stmt_iterator * bsi, ...@@ -1994,7 +2008,8 @@ vectorizable_conversion (tree stmt, block_stmt_iterator * bsi,
if (!STMT_VINFO_RELEVANT_P (stmt_info)) if (!STMT_VINFO_RELEVANT_P (stmt_info))
return false; return false;
gcc_assert (STMT_VINFO_DEF_TYPE (stmt_info) == vect_loop_def); if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_loop_def)
return false;
if (STMT_VINFO_LIVE_P (stmt_info)) if (STMT_VINFO_LIVE_P (stmt_info))
{ {
...@@ -2134,12 +2149,21 @@ vectorizable_assignment (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt) ...@@ -2134,12 +2149,21 @@ vectorizable_assignment (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
if (ncopies > 1) if (ncopies > 1)
return false; /* FORNOW */ return false; /* FORNOW */
/* Is vectorizable assignment? */
if (!STMT_VINFO_RELEVANT_P (stmt_info)) if (!STMT_VINFO_RELEVANT_P (stmt_info))
return false; return false;
gcc_assert (STMT_VINFO_DEF_TYPE (stmt_info) == vect_loop_def); if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_loop_def)
return false;
/* FORNOW: not yet supported. */
if (STMT_VINFO_LIVE_P (stmt_info))
{
if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "value used after loop.");
return false;
}
/* Is vectorizable assignment? */
if (TREE_CODE (stmt) != GIMPLE_MODIFY_STMT) if (TREE_CODE (stmt) != GIMPLE_MODIFY_STMT)
return false; return false;
...@@ -2246,20 +2270,21 @@ vectorizable_operation (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt) ...@@ -2246,20 +2270,21 @@ vectorizable_operation (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
gcc_assert (ncopies >= 1); gcc_assert (ncopies >= 1);
/* Is STMT a vectorizable binary/unary operation? */
if (!STMT_VINFO_RELEVANT_P (stmt_info)) if (!STMT_VINFO_RELEVANT_P (stmt_info))
return false; return false;
gcc_assert (STMT_VINFO_DEF_TYPE (stmt_info) == vect_loop_def); if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_loop_def)
return false;
/* FORNOW: not yet supported. */
if (STMT_VINFO_LIVE_P (stmt_info)) if (STMT_VINFO_LIVE_P (stmt_info))
{ {
/* FORNOW: not yet supported. */
if (vect_print_dump_info (REPORT_DETAILS)) if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "value used after loop."); fprintf (vect_dump, "value used after loop.");
return false; return false;
} }
/* Is STMT a vectorizable binary/unary operation? */
if (TREE_CODE (stmt) != GIMPLE_MODIFY_STMT) if (TREE_CODE (stmt) != GIMPLE_MODIFY_STMT)
return false; return false;
...@@ -2514,21 +2539,21 @@ vectorizable_type_demotion (tree stmt, block_stmt_iterator *bsi, ...@@ -2514,21 +2539,21 @@ vectorizable_type_demotion (tree stmt, block_stmt_iterator *bsi,
optab optab; optab optab;
enum machine_mode vec_mode; enum machine_mode vec_mode;
/* Is STMT a vectorizable type-demotion operation? */
if (!STMT_VINFO_RELEVANT_P (stmt_info)) if (!STMT_VINFO_RELEVANT_P (stmt_info))
return false; return false;
gcc_assert (STMT_VINFO_DEF_TYPE (stmt_info) == vect_loop_def); if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_loop_def)
return false;
/* FORNOW: not yet supported. */
if (STMT_VINFO_LIVE_P (stmt_info)) if (STMT_VINFO_LIVE_P (stmt_info))
{ {
/* FORNOW: not yet supported. */
if (vect_print_dump_info (REPORT_DETAILS)) if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "value used after loop."); fprintf (vect_dump, "value used after loop.");
return false; return false;
} }
/* Is STMT a vectorizable type-demotion operation? */
if (TREE_CODE (stmt) != GIMPLE_MODIFY_STMT) if (TREE_CODE (stmt) != GIMPLE_MODIFY_STMT)
return false; return false;
...@@ -2723,21 +2748,21 @@ vectorizable_type_promotion (tree stmt, block_stmt_iterator *bsi, ...@@ -2723,21 +2748,21 @@ vectorizable_type_promotion (tree stmt, block_stmt_iterator *bsi,
int j; int j;
tree vectype_in; tree vectype_in;
/* Is STMT a vectorizable type-promotion operation? */
if (!STMT_VINFO_RELEVANT_P (stmt_info)) if (!STMT_VINFO_RELEVANT_P (stmt_info))
return false; return false;
gcc_assert (STMT_VINFO_DEF_TYPE (stmt_info) == vect_loop_def); if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_loop_def)
return false;
/* FORNOW: not yet supported. */
if (STMT_VINFO_LIVE_P (stmt_info)) if (STMT_VINFO_LIVE_P (stmt_info))
{ {
/* FORNOW: not yet supported. */
if (vect_print_dump_info (REPORT_DETAILS)) if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "value used after loop."); fprintf (vect_dump, "value used after loop.");
return false; return false;
} }
/* Is STMT a vectorizable type-promotion operation? */
if (TREE_CODE (stmt) != GIMPLE_MODIFY_STMT) if (TREE_CODE (stmt) != GIMPLE_MODIFY_STMT)
return false; return false;
...@@ -3064,6 +3089,19 @@ vectorizable_store (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt) ...@@ -3064,6 +3089,19 @@ vectorizable_store (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
VEC(tree,heap) *dr_chain = NULL, *oprnds = NULL, *result_chain = NULL; VEC(tree,heap) *dr_chain = NULL, *oprnds = NULL, *result_chain = NULL;
gcc_assert (ncopies >= 1); gcc_assert (ncopies >= 1);
if (!STMT_VINFO_RELEVANT_P (stmt_info))
return false;
if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_loop_def)
return false;
if (STMT_VINFO_LIVE_P (stmt_info))
{
if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "value used after loop.");
return false;
}
/* Is vectorizable store? */ /* Is vectorizable store? */
if (TREE_CODE (stmt) != GIMPLE_MODIFY_STMT) if (TREE_CODE (stmt) != GIMPLE_MODIFY_STMT)
...@@ -3710,20 +3748,21 @@ vectorizable_load (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt) ...@@ -3710,20 +3748,21 @@ vectorizable_load (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
bool strided_load = false; bool strided_load = false;
tree first_stmt; tree first_stmt;
/* Is vectorizable load? */
if (!STMT_VINFO_RELEVANT_P (stmt_info)) if (!STMT_VINFO_RELEVANT_P (stmt_info))
return false; return false;
gcc_assert (STMT_VINFO_DEF_TYPE (stmt_info) == vect_loop_def); if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_loop_def)
return false;
/* FORNOW: not yet supported. */
if (STMT_VINFO_LIVE_P (stmt_info)) if (STMT_VINFO_LIVE_P (stmt_info))
{ {
/* FORNOW: not yet supported. */
if (vect_print_dump_info (REPORT_DETAILS)) if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "value used after loop."); fprintf (vect_dump, "value used after loop.");
return false; return false;
} }
/* Is vectorizable load? */
if (TREE_CODE (stmt) != GIMPLE_MODIFY_STMT) if (TREE_CODE (stmt) != GIMPLE_MODIFY_STMT)
return false; return false;
...@@ -4010,7 +4049,9 @@ vectorizable_live_operation (tree stmt, ...@@ -4010,7 +4049,9 @@ vectorizable_live_operation (tree stmt,
tree def, def_stmt; tree def, def_stmt;
enum vect_def_type dt; enum vect_def_type dt;
if (!STMT_VINFO_LIVE_P (stmt_info)) gcc_assert (STMT_VINFO_LIVE_P (stmt_info));
if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_reduction_def)
return false; return false;
if (TREE_CODE (stmt) != GIMPLE_MODIFY_STMT) if (TREE_CODE (stmt) != GIMPLE_MODIFY_STMT)
...@@ -4123,16 +4164,18 @@ vectorizable_condition (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt) ...@@ -4123,16 +4164,18 @@ vectorizable_condition (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
if (!STMT_VINFO_RELEVANT_P (stmt_info)) if (!STMT_VINFO_RELEVANT_P (stmt_info))
return false; return false;
gcc_assert (STMT_VINFO_DEF_TYPE (stmt_info) == vect_loop_def); if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_loop_def)
return false;
/* FORNOW: not yet supported. */
if (STMT_VINFO_LIVE_P (stmt_info)) if (STMT_VINFO_LIVE_P (stmt_info))
{ {
/* FORNOW: not yet supported. */
if (vect_print_dump_info (REPORT_DETAILS)) if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "value used after loop."); fprintf (vect_dump, "value used after loop.");
return false; return false;
} }
/* Is vectorizable conditional operation? */
if (TREE_CODE (stmt) != GIMPLE_MODIFY_STMT) if (TREE_CODE (stmt) != GIMPLE_MODIFY_STMT)
return false; return false;
...@@ -4225,110 +4268,103 @@ vect_transform_stmt (tree stmt, block_stmt_iterator *bsi, bool *strided_store) ...@@ -4225,110 +4268,103 @@ vect_transform_stmt (tree stmt, block_stmt_iterator *bsi, bool *strided_store)
tree orig_stmt_in_pattern; tree orig_stmt_in_pattern;
bool done; bool done;
if (STMT_VINFO_RELEVANT_P (stmt_info)) switch (STMT_VINFO_TYPE (stmt_info))
{ {
switch (STMT_VINFO_TYPE (stmt_info)) case type_demotion_vec_info_type:
{ done = vectorizable_type_demotion (stmt, bsi, &vec_stmt);
case type_demotion_vec_info_type: gcc_assert (done);
done = vectorizable_type_demotion (stmt, bsi, &vec_stmt); break;
gcc_assert (done);
break;
case type_promotion_vec_info_type: case type_promotion_vec_info_type:
done = vectorizable_type_promotion (stmt, bsi, &vec_stmt); done = vectorizable_type_promotion (stmt, bsi, &vec_stmt);
gcc_assert (done); gcc_assert (done);
break; break;
case type_conversion_vec_info_type: case type_conversion_vec_info_type:
done = vectorizable_conversion (stmt, bsi, &vec_stmt); done = vectorizable_conversion (stmt, bsi, &vec_stmt);
gcc_assert (done); gcc_assert (done);
break; break;
case op_vec_info_type: case op_vec_info_type:
done = vectorizable_operation (stmt, bsi, &vec_stmt); done = vectorizable_operation (stmt, bsi, &vec_stmt);
gcc_assert (done); gcc_assert (done);
break; break;
case assignment_vec_info_type: case assignment_vec_info_type:
done = vectorizable_assignment (stmt, bsi, &vec_stmt); done = vectorizable_assignment (stmt, bsi, &vec_stmt);
gcc_assert (done); gcc_assert (done);
break; break;
case load_vec_info_type: case load_vec_info_type:
done = vectorizable_load (stmt, bsi, &vec_stmt); done = vectorizable_load (stmt, bsi, &vec_stmt);
gcc_assert (done); gcc_assert (done);
break; break;
case store_vec_info_type: case store_vec_info_type:
done = vectorizable_store (stmt, bsi, &vec_stmt); done = vectorizable_store (stmt, bsi, &vec_stmt);
gcc_assert (done); gcc_assert (done);
if (DR_GROUP_FIRST_DR (stmt_info)) if (DR_GROUP_FIRST_DR (stmt_info))
{ {
/* In case of interleaving, the whole chain is vectorized when the /* In case of interleaving, the whole chain is vectorized when the
last store in the chain is reached. Store stmts before the last last store in the chain is reached. Store stmts before the last
one are skipped, and there vec_stmt_info shouldn't be freed one are skipped, and there vec_stmt_info shouldn't be freed
meanwhile. */ meanwhile. */
*strided_store = true; *strided_store = true;
if (STMT_VINFO_VEC_STMT (stmt_info)) if (STMT_VINFO_VEC_STMT (stmt_info))
is_store = true; is_store = true;
} }
else else
is_store = true; is_store = true;
break; break;
case condition_vec_info_type: case condition_vec_info_type:
done = vectorizable_condition (stmt, bsi, &vec_stmt); done = vectorizable_condition (stmt, bsi, &vec_stmt);
gcc_assert (done); gcc_assert (done);
break; break;
case call_vec_info_type: case call_vec_info_type:
done = vectorizable_call (stmt, bsi, &vec_stmt); done = vectorizable_call (stmt, bsi, &vec_stmt);
break; break;
default: case reduc_vec_info_type:
if (vect_print_dump_info (REPORT_DETAILS)) done = vectorizable_reduction (stmt, bsi, &vec_stmt);
fprintf (vect_dump, "stmt not supported."); gcc_assert (done);
gcc_unreachable (); break;
}
gcc_assert (vec_stmt || *strided_store); default:
if (vec_stmt) if (!STMT_VINFO_LIVE_P (stmt_info))
{ {
STMT_VINFO_VEC_STMT (stmt_info) = vec_stmt; if (vect_print_dump_info (REPORT_DETAILS))
orig_stmt_in_pattern = STMT_VINFO_RELATED_STMT (stmt_info); fprintf (vect_dump, "stmt not supported.");
if (orig_stmt_in_pattern) gcc_unreachable ();
{
stmt_vec_info stmt_vinfo = vinfo_for_stmt (orig_stmt_in_pattern);
if (STMT_VINFO_IN_PATTERN_P (stmt_vinfo))
{
gcc_assert (STMT_VINFO_RELATED_STMT (stmt_vinfo) == stmt);
/* STMT was inserted by the vectorizer to replace a
computation idiom. ORIG_STMT_IN_PATTERN is a stmt in the
original sequence that computed this idiom. We need to
record a pointer to VEC_STMT in the stmt_info of
ORIG_STMT_IN_PATTERN. See more details in the
documentation of vect_pattern_recog. */
STMT_VINFO_VEC_STMT (stmt_vinfo) = vec_stmt;
}
}
} }
} }
if (STMT_VINFO_LIVE_P (stmt_info)) if (STMT_VINFO_LIVE_P (stmt_info)
&& STMT_VINFO_TYPE (stmt_info) != reduc_vec_info_type)
{ {
switch (STMT_VINFO_TYPE (stmt_info)) done = vectorizable_live_operation (stmt, bsi, &vec_stmt);
{ gcc_assert (done);
case reduc_vec_info_type: }
done = vectorizable_reduction (stmt, bsi, &vec_stmt);
gcc_assert (done); if (vec_stmt)
break; {
STMT_VINFO_VEC_STMT (stmt_info) = vec_stmt;
default: orig_stmt_in_pattern = STMT_VINFO_RELATED_STMT (stmt_info);
done = vectorizable_live_operation (stmt, bsi, &vec_stmt); if (orig_stmt_in_pattern)
gcc_assert (done); {
} stmt_vec_info stmt_vinfo = vinfo_for_stmt (orig_stmt_in_pattern);
/* STMT was inserted by the vectorizer to replace a computation idiom.
ORIG_STMT_IN_PATTERN is a stmt in the original sequence that
computed this idiom. We need to record a pointer to VEC_STMT in
the stmt_info of ORIG_STMT_IN_PATTERN. See more details in the
documentation of vect_pattern_recog. */
if (STMT_VINFO_IN_PATTERN_P (stmt_vinfo))
{
gcc_assert (STMT_VINFO_RELATED_STMT (stmt_vinfo) == stmt);
STMT_VINFO_VEC_STMT (stmt_vinfo) = vec_stmt;
}
}
} }
return is_store; return is_store;
......
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