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: [tree-ssa-lno] vectorizer patch.


Richard Henderson <rth@redhat.com> writes:

> On Fri, Jan 02, 2004 at 05:00:30PM -0500, David Edelsohn wrote:
> > 	How should the vectorizer determine what types used in loops are
> > profitable to vectorize?  How should it determine which target-dependent
> > vector instructions and stride to use?
> 
> That's not what the hook does.  All the hook does is take a scalar type
> and return a vector type of width UNITS_PER_SIMD_WORD.  This can be done
> with no target hook at all.
> 
> As for the determination, I believe that iterating over all vector modes
> and testing each against VECTOR_MODE_SUPPORTED_P would be a good start.
> You'd want to start at the widest mode and iterate down, so that you find
> V4SI before V2SI if both are supported.

Yes, this is the right thing to do, at least initially; eventually no
doubt we'll want to try to work out which mode is actually fastest,
but that can also be done using information that is already
available.

This would also eliminate the UNITS_PER_SIMD_WORD macro, since it'd
now be unnecessary.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


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