google / google/clspv

Spirv as target

Open
#591 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
LLVM
Stars
729
Forks
110
Avg merge
17h 51m
Merged PRs (30d)
23

Description

I wrote the Circle C++ compiler. I'm considering integrating graphics shaders as a single-source language extension, similar to how CUDA integrates as single source with the host compiler.

Andrew Richards directed me here. I'm not entirely understanding what clspv is, or if it could be used to help me generate SPIRV.

Currently I generate LLVM/x64 and LLVM/NVVM by descending my translation unit's AST. Ideally there'd be a SPIRV LLVM target, so that I could create a llvm::Module in the same context as the rest of the translation unit, and they'd share the same types, and I'd just re-use the same codegen code, descend down the AST, and use IRBuilder to produce function definitions for this SPIRV Module.

I don't know if this is part of clspv, or if it's part of SPIRV-Tools, or if it's part of the LLVM trunk. What should I be looking at to get this started?

sean

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.