[llvm-dev] [SPIR-V] SPIR-V in LLVM

Neil Henning via llvm-dev llvm-dev at lists.llvm.org
Tue Jul 18 02:24:44 PDT 2017

So the things we had to work around (which could have been fixed by 
having a triple):

* Bool should stay as an i1 instead of being moved between i8 <-> i1 
* We want structs to be the return type instead of using sret.
* We want structs to be passed by value instead of byval pointers.
* We want our pointer types to all be in the non-integral address space.
* We want alloca to be in a non-0 address space.

All of the above is fixable by having an actual SPIR-V target triple.

I think there was push-back previously on just adding a triple because 
many of us still want a real SPIR-V target in LLVM. If we could add a 
triple now and then continue the backend discussions after that would be 
helpful for us!

-Codeplay Neil.

On 2017-07-17 18:26, Pete Cooper wrote:
> Hi Neil
>> On Jul 17, 2017, at 6:55 AM, Neil Henning via llvm-dev
>> <llvm-dev at lists.llvm.org> wrote:
>> I did not want to make the mistake of forking LLVM/Clang - so there
>> are a bunch of passes in there that are us undoing things that Clang
>> has options for (if we had a SPIRV triple).
>  Out of curiosity, can you elaborate on this? What is clang doing
> wrong, and why does a new triple solve it?
> Also, we have loads of triple's for targets not in LLVM. You should
> just add one for SPIRV if you need it. I can't imagine that being
> controversial to folks.
> Cheers,
> Pete

More information about the llvm-dev mailing list