[LLVMdev] [RFC] Upstreaming LLVM/SPIR-V converter
Liu, Yaxun (Sam)
Yaxun.Liu at amd.com
Wed May 13 05:56:08 PDT 2015
Khronos Group SPIR WG is working on a bi-way converter between LLVM bitcode and SPIR-V (https://www.khronos.org/registry/spir-v/specs/1.0/SPIRV.pdf ) binary and is willing to upstream it to the LLVM project.
The bi-way converter uses a common in-memory representation of SPIR-V. It works by breaking down a module to instructions and construct the translated module in memory then output it. Currently it supports SPIR-V common instructions and OpenCL specific instructions. Supporting of other languages is under consideration.
We plan to refactor the LLVM to SPIR-V converter as a backend at llvm/lib/Target/SPIRV to allow Clang targeting SPIR-V. Since this will result in an unconventional backend which does not use SelectionDAG/MC, we would like to know whether it is acceptable. We are open to the SelectionDAG/MC approach if the community recommends it.
For the SPIR-V to LLVM converter, we are seeking suggestions on its proper location in the LLVM project.
Any comments are welcome. Thanks.
Yaxun Liu
AMD
More information about the llvm-dev
mailing list