Implement compatibility for external LLVM-IL
- Dominant language
- LLVM
- Stars
- 729
- Forks
- 110
- Avg merge
- 17h 51m
- Merged PRs (30d)
- 23
Description
The compiler has an API to compile LLVM-IL code directly.
The idea of clspv is to use the semi-compiled sources (from cl to IL) for future compilation with other parameters or to compile with a different combination of the semi-compiled sources. In this case all IL-sources are generated by the internal (LLVM) clspv FrontEnd.
The clvk has mode CLVK_ENABLE_SPIRV_IL.
In this case the driver prepares the IL using [SPIRV-LLVM-Translator](https://github.com/KhronosGroup/SPIRV-LLVM-Translator).
The problem with "_use-native-builtins_". The SPIRV-LLVM-Translator doesn't use this option and generate LLVM-IL using it native instructions instead of to using the built-ins from clspv--.bc.
The proposal is to implement a new Pass that should intercept instructions that not in the list of "_use-native-builtins_" and replace them with the one of built-ins from clspv--.bc.
This pass could implemented for all external IL or directly to support the SPIRV-LLVM-Translator only.
Contributor guide
Assessment
This issue has not been assessed yet.