This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Teach the vectorizer about multiple sizes
- From: Ira Rosen <IRAR at il dot ibm dot com>
- To: Richard Guenther <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 7 Oct 2010 09:06:30 +0200
- Subject: Re: [PATCH] Teach the vectorizer about multiple sizes
- References: <alpine.LNX.2.00.1010061441520.8982@zhemvz.fhfr.qr>
> * tree-vect-loop.c (vect_analyze_loop_3): Split out core part
> of vect_analyze_loop here.
> (vect_analyze_loop): Loop over vector sizes calling
vect_analyze_loop_3.
You mean vect_analyze_loop_2, right?
>
> ! /* Function vect_analyze_loop_2.
>
> Apply a set of analyses on LOOP, and create a loop_vec_info struct
> for it. The different analyses will record information in the
> loop_vec_info struct. */
> ! static bool
> ! vect_analyze_loop_2 (loop_vec_info loop_vinfo)
> {
> bool ok, dummy;
> int max_vf = MAX_VECTORIZATION_FACTOR;
> int min_vf = 2;
Is max_vf/min_vf computation redundant now?
>
> ! do
> ! {
> ! /* Check the CFG characteristics of the loop (nesting,
> entry/exit). */
> ! loop_vinfo = vect_analyze_loop_form (loop);
> ! if (!loop_vinfo)
> ! {
> ! if (vect_print_dump_info (REPORT_DETAILS))
> ! fprintf (vect_dump, "bad loop form.");
> ! return NULL;
> ! }
I think this part can be done outside the do-loop if
loop_vinfo = new_loop_vec_info (loop);
LOOP_VINFO_NITERS (loop_vinfo) = number_of_iterations;
LOOP_VINFO_NITERS_UNCHANGED (loop_vinfo) = number_of_iterations;
is moved from vect_analyze_loop_form to this function.
Thanks,
Ira