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: [i386] Replace builtins with vector extensions


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
example).

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,

--
Marc Glisse


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