This repository contains source code for the LLVM/SPIR-V Bi-Directional Translator, a library and tool for translation between LLVM IR and SPIR-V.
The LLVM/SPIR-V Bi-Directional Translator is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.
The files/directories related to the translator:
- include/LLVMSPIRVLib.h - header file
- lib/SPIRV - library for SPIR-V in-memory representation, decoder/encoder and LLVM/SPIR-V translator
- tools/llvm-spirv - command line utility for translating between LLVM bitcode and SPIR-V binary
The main
branch of this repo is aimed to be buildable with the latest
LLVM main
revision.
The translator can be built with the latest(nightly) package of LLVM. For Ubuntu and Debian systems LLVM provides repositories with nightly builds at https://apt.llvm.org/. For example the latest package for Ubuntu 16.04 can be installed with the following commands: