This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Teach the vectorizer about multiple sizes


>    * 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]