This is the mail archive of the
mailing list for the GCC project.
Re: [tree-ssa-lno] vectorizer patch.
- From: Richard Henderson <rth at redhat dot com>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Dorit Naishlos <dorit at il dot ibm dot com>, Daniel Berlin <dberlin at dberlin dot org>
- Date: Fri, 2 Jan 2004 14:12:09 -0800
- Subject: Re: [tree-ssa-lno] vectorizer patch.
- References: <20040102214015.GB20995@redhat.com> <200401022203.i02M30T29806@makai.watson.ibm.com>
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.