[LLVMdev] RFC: AVX Pattern Specification [LONG]

David Greene dag at cray.com
Fri May 1 10:39:15 PDT 2009


On Friday 01 May 2009 12:25, mon p wang wrote:

> > * Unify all "important" x86 SIMD instructions into one framework and
> > provide
> >  consistency
>
> While almost all of this sounds pretty great to me, since I'm also in
> the process of cleaning up how x86 vector shuffles and shifts are
> implemented, I'm a little worried by what "important" means.  Aren't
> *all* the instructions important?  Was the goal to convert 50% of the
> instructions over to the new class hierarchy and leave 50% as they
> currently are?

"Important" in this context means all SSE instructions.  I'm excluding MMX and 
3dNow.  I suppose we could add them but I just don't see much point.

One could also imagine moving the scalar patterns into this but frankly, the
scalar instruction set isn't changing much.  The vector instruction set is 
more likely to be extended which is why I put the focus there.  I'm trying to
set us up better for the future.

> > * Specify patterns and asm strings *once* per instruction type /
> > family
> >  rather than the current scheme of multiple patterns for essentially
> > the
> >  same instruction
>
> Sounds great; you'll probably need some kind of custom lowering to go
> with this to make sure instructions end up in whatever canonicalized
> form you've chosen.

Maybe.  More likely we will need some more pattern fragments.  At least that's 
what I've run into so far.

> > * Bugfixes / optimizations / new patterns instantly apply to all SSE
> > levels
> >  and AVX
> >
> > The cons:
> >
> > * Transition from X86InstrSSE.td
>
> What's the timeline look like for this?

Good question.  What I hope to do is add AVX stuff incrementally.  Basic 
arithmetic works now.  But I want to vet this proposal fully before I start
adding things to the repository.  So the timeline really depends on that
process.  Once people are comfortable with moving forward, I'll start checking
things in as they become available.

Moving SSE over is a longer timeline.  I would expect that wouldn't be
done until 2.7 at the very earliest and probably more like 2.8.

                                    -Dave



More information about the llvm-dev mailing list