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

Stefanus Du Toit sdt at google.com
Tue May 19 08:39:02 PDT 2015


On Tue, 19 May 2015 at 11:34 Owen Anderson <resistor at mac.com> wrote:

> More generally,  making it a target immediately invokes a lot of behavior
> that is undesirable for a serialization format between a fronted and a
> backend.  You don’t *want* LLVM to do a lot of wacky CodeGenPrepare and/or
> lowering before emitting SPIR-V, which is likely to lose source-level
> information that the eventual consumer wanted to have available.  You do
> not want to leverage any of the general target architecture.
>

I don't think the suggestion is to use SelectionDAG and friends in this
target. My understanding is that this would only involve registering as a
target similar to the way the CppBackend does, then invoking the code from
lib/SPIRV.

By registering as a target you can select SPIR-V for Clang emission the
same way you select, say, X86 or ARM, rather than adding a special flag.

Stefanus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150519/e95c7e81/attachment.html>


More information about the llvm-dev mailing list