[LLVMdev] [RFC] Upstreaming LLVM/SPIR-V converter

Liu, Yaxun (Sam) Yaxun.Liu at amd.com
Sat May 16 12:21:04 PDT 2015


Thanks all for the very helpful suggestions.

In a sense, SPIR-V is like an alternative binary format for LLVM, since an LLVM bitcode can be converted to SPIR-V and vice versa.

On the other hand, SPIR-V is like a target, since it can be consumed by OpenCL and Vulkan platform.

I am thinking maybe the functionality of the bi-way conversion can be kept at llvm/lib/Bitcode/SPIRV, which will facilitate OpenCL vendors to do conversions between LLVM and SPIR-V. On the other hand, we create a llvm/Target/SPIR-V, which uses llvm/lib/Bitcode/SPIRV to generate SPIR-V. The SPIR-V target allows Clang and other LLVM front ends to target generic OpenCL/Vulkan platforms.

Sam

-----Original Message-----
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of jingu kang
Sent: Saturday, May 16, 2015 6:03 AM
To: Chris Lattner
Cc: LLVM Developers Mailing List
Subject: Re: [LLVMdev] [RFC] Upstreaming LLVM/SPIR-V converter

2015-05-16 6:42 GMT+01:00 Chris Lattner <clattner at apple.com>:
>
> > On May 15, 2015, at 9:53 AM, Chris Bieneman <beanz at apple.com> wrote:
> >
> > +1 to lib/Target/SPIRV/(Reader|Writer)
> >
> > I really like this idea. I’ve talked with some people on both the LLVM and Khronos sides and I really think adding SPIR-V support to LLVM as an optional program serialization format would be fantastic. I think it would make it even easier for LLVM-based tools to be integrated into GPU authoring and execution pipelines.
>
> I’m not that familiar with SPIRV, but if it really is a serialization format, then why isn’t it a parallel to llvm/lib/Bitcode?

+1 livm/lib/SPIRV like llvm/lib/Bitcode and addition of llvm
instrinsics for SPIR-V.

_______________________________________________
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list