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

Anastasia Stulova via llvm-dev llvm-dev at lists.llvm.org
Tue Feb 27 08:51:31 PST 2018

+ Brian

From: Nicholas Wilson <iamthewilsonator at hotmail.com>
Sent: 27 February 2018 13:23
To: Anastasia Stulova
Cc: Tomeu Vizoso; llvm-dev at lists.llvm.org; tstellar at redhat.com; nd
Subject: Re: [llvm-dev] SPIRV-LLVM as an external tool

On 27 Feb 2018, at 9:07 pm, Anastasia Stulova via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote:

> SPIR-V does not have to be a part of LLVM for you to do this.  You can add
> the SPIR-V target to clang and then define a SPIR-V toolchain (i.e. clang/Driver/Toolchains)
> that uses the external tool to translate LLVM IR to SPIR-V.

Ok. I guess if Clang community accepts this way, it would be better to set up the SPIRV converter as a tool of LLVM.

So the question is are there any downsides of this? Or would anyone object if we add the converter to the LLVM project as an optional tool? We would of course take care of configuring and maintaining it ourselves.


IIUC that would make clang invoke the converter on the produced IR as an external program?
Having it available as only that would be a nuisance to those of us who would rather just call the passes directly, with eventual transition to a proper backend.
We need to have the converter, for both directions, available as an LLVM tool anyway for testing with lit (btw we really should make the asm output the same as the rest of the vulkan tools, the current format is really ugly and annoying to capture with regexen).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180227/29a8a81d/attachment.html>

More information about the llvm-dev mailing list