This is the mail archive of the
mailing list for the GCC project.
Re: [i386] Replace builtins with vector extensions
- From: Marc Glisse <marc dot glisse at inria dot fr>
- To: Olivier Hainque <hainque at adacore dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Uros Bizjak <ubizjak at gmail dot com>
- Date: Thu, 9 Oct 2014 19:46:03 +0200 (CEST)
- Subject: Re: [i386] Replace builtins with vector extensions
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 02 dot 1404112137530 dot 19663 at stedding dot saclay dot inria dot fr> <alpine dot DEB dot 2 dot 10 dot 1404281322180 dot 3620 at laptop-mg dot saclay dot inria dot fr> <alpine dot DEB dot 2 dot 10 dot 1405171529460 dot 3642 at laptop-mg dot saclay dot inria dot fr> <alpine dot DEB dot 2 dot 10 dot 1406281230560 dot 9234 at laptop-mg dot saclay dot inria dot fr> <20140703101605 dot GA12583 at msticlxl57 dot ims dot intel dot com> <alpine dot DEB dot 2 dot 10 dot 1407031613450 dot 2526 at laptop-mg dot saclay dot inria dot fr> <20140708111402 dot GB14139 at msticlxl57 dot ims dot intel dot com> <alpine dot DEB dot 2 dot 11 dot 1407261739190 dot 19562 at stedding dot saclay dot inria dot fr> <alpine dot DEB dot 2 dot 11 dot 1410091158301 dot 1624 at laptop-mg dot saclay dot inria dot fr> <7682A86E-125C-46F8-8C67-701A77A34529 at adacore dot com>
On Thu, 9 Oct 2014, Olivier Hainque wrote:
On Oct 9, 2014, at 12:33 PM, Marc Glisse wrote:
If this is accepted, I will gladly prepare patches removing the unused builtins and extending this to a few more operations (integer vectors in particular). If this is not the direction we want to go, I'd like to hear it clearly so I can move on...
As we discussed offlist, removing all the builtins would be problematic for
Ada as they are the only medium allowing flexible access to vector instructions
(aside autovectorization) for users.
Today, the model is very simple: people who want to build on top of vector
operations just bind to the builtins they need and expose higher level
interfaces if they like, provided proper type definitions (see g-sse.ads for
It is sad that this prevents us from removing the builtins, but I agree
that we can't just drop ada+sse users like that. Well, less work for me if
I don't have to remove the builtins, and my main motivation is
optimization, even if I tried to sell the clean up to convince people.
Uros, is it still ok if I change the intrinsics without removing the
builtins? (with testcases for HJ and not before Kirill says it is ok)
Without the builtins, we'd need to define syntax + semantics for vector
operations in the language. While this is an interesting perspective, we
don't have that today and this would be a fair amount of non-trivial work
I'm afraid, not something we can take on just like that.
I think it is an interesting possibility to keep in mind (maybe in a few
years?). Basic support in the C front-end is surprisingly simple (C++
templates are a different story), and doesn't need to be duplicated for
sse/altivec/neon... only the "weird" operations really need builtins.
Thanks for posting this,