void
costs::analyze_loop_vinfo (loop_vec_info loop_vinfo)
{
- /* Record the number of times that the vector loop would execute,
- if known. */
- class loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- auto scalar_niters = max_stmt_executions_int (loop);
- if (scalar_niters >= 0)
- {
- unsigned int vf = vect_vf_for_cost (loop_vinfo);
- if (LOOP_VINFO_LENS (loop_vinfo).is_empty ())
- m_num_vector_iterations = scalar_niters / vf;
- else
- m_num_vector_iterations = CEIL (scalar_niters, vf);
- }
-
/* Detect whether we're vectorizing for VLA and should apply the unrolling
heuristic described above m_unrolled_vls_niters. */
record_potential_vls_unrolling (loop_vinfo);
unsigned HOST_WIDE_INT m_unrolled_vls_niters = 0;
unsigned HOST_WIDE_INT m_unrolled_vls_stmts = 0;
- /* If we're vectorizing a loop that executes a constant number of times,
- this variable gives the number of times that the vector loop would
- iterate, otherwise it is zero. */
- uint64_t m_num_vector_iterations = 0;
-
void analyze_loop_vinfo (loop_vec_info);
void record_potential_vls_unrolling (loop_vec_info);
bool prefer_unrolled_loop () const;