[llvm] [SPIR-V] Expose an API call to initialize SPIRV target and translate input LLVM IR module to SPIR-V (PR #107216)
Dmitry Sidorov via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 10 06:41:32 PDT 2024
MrSidims wrote:
>From my perspective as SPIR-V To LLVM IR translator developer current approach is OK. For the proposed options above:
> go full parsing (as you did before), losing compile-time checks and self-documenting code, but simple to use.
This won't affect the use case described in the PR description, but it may affect other 3rd party projects, as they would need to parse options once to get extensions string and then pass it to llvm:toSpirv call along with other options, while the whole parsing might be done just here in the SPIR-V backend. But I don't have a strong opinion about this.
> do it like Vulkan (linked list of structs, head passed by pointer), bringing more compile-time checks/documentations, but making usage slightly more verbose.
Personally that would be my least favorable option. But I'm not an expert in llvm's guideline in the regard of how to parse and pass options to binaries and library calls.
https://github.com/llvm/llvm-project/pull/107216
More information about the llvm-commits
mailing list