[llvm-dev] SPIRV-LLVM as an external tool

Ronan KERYELL via llvm-dev llvm-dev at lists.llvm.org
Wed Feb 21 03:16:21 PST 2018

>>>>> On Wed, 21 Feb 2018 09:58:34 +0000, Nicholas Wilson via llvm-dev <llvm-dev at lists.llvm.org> said:

    Nicholas> I agree that having the conversion live as part of LLVM is
    Nicholas> the best option going forward.

Yes. :-)

    Nicholas>   libclc is an library implementation of the OpenCL
    Nicholas> builtins and I think its fine for that aspect of the
    Nicholas> converter, i.e. consumption of SPIR-V into LLVM IR in
    Nicholas> preparation for code generation by LLVM by its various
    Nicholas> backends as a library to link the generated code to, to
    Nicholas> live in an external repo.

    Nicholas> This is fine because SPIR<->LLVM IR is trivial,
    Nicholas> SPIR-V<->LLVM is not.

LLVM IR -> SPIR is not that trivial because for example SPIR 2.0
compliant bitcode requires to be encoded into LLVM 3.4 bitcode format,
which is not obvious from, say, LLVM 7.

By the way there is a market for another open-source project: generic
down-grader from modern bitcode to anything older. :-) There are some
specific versions flying around, but this is another story...

More information about the llvm-dev mailing list