[patch, vect] Support multiple types in SLP and generalize multi-step conversion

Ira Rosen IRAR@il.ibm.com
Tue Aug 19 08:48:00 GMT 2008



Dorit Nuzman/Haifa/IBM wrote on 19/08/2008 01:33:03:


> > O.K. for mainline?
> >
>
> yes. just a few very minor comments:
>
> > +   - MULTI_STEP_CVT determines if the operation is a multi-step
conversion,
> > +   like char->short->int - in that case MULTI_STEP_CVT will be 2.
> The value of
> > +   log2(multi_step_cvt) is the number of required steps.
>
> please change "number of required steps" to "number of required
> intermediate steps"

Oops, the documentation was completely incorrect here. I fixed it.

>
> > +      /* We assume here that there will not be more than 4 steps in
> > +         promotion sequence. We try three times to get to
NARROW_VECTYPE,
> > +         and fail if we do not.  */
> > +      *interm_types = VEC_alloc (tree, heap, 3);
> > +      for (i = 0; i < 3; i++)
> > +        {
>
> please use a parameter instead of 3 - maybe MAX_INTERM_CVT_STEPS or
> something like that.
>
> (both of the above appear twice.)

Done.

>
> > +/* Get vectorized definitions for loop-based vectorization. For the
first
> > +   operand we call vect_get_vec_def_for_operand(), and for the rest we
get
> > +   a copy with vect_get_vec_def_for_stmt_copy(). See
> > +   vect_get_vec_def_for_stmt_copy() for details.  */
> > +
> > +static void
> > +vect_get_loop_based_defs (tree *oprnd, gimple stmt, enum vect_def_type
dt,
> > +                          VEC (tree, heap) **vec_oprnds, int
> multi_step_cvt)
> > +{
>
> please add a short description of the inputs and outputs (e.g. so it
> would be clear from the documentation that what this function does
> is collect all the relevant defs into a VEC).

Done.

I also realized that there is no need in the parameter I added to
vect_get_slp_defs(), so I removed it.

I am attaching the final patch that I've just committed.

Thanks,
Ira

(See attached file: multi-types-final.txt)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: multi-types-final.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080819/756d3514/attachment.txt>


More information about the Gcc-patches mailing list