[clang] [Driver][SPIR-V] Use consistent tools to convert between text and binary form (PR #120266)

Sven van Haastregt via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 8 01:28:42 PST 2025


https://github.com/svenvh requested changes to this pull request.

Thanks for drawing this to my attention!

The output produced by llvm-spirv's `-to-text` is an internal textual format, intended for testing llvm-spirv only (@MrSidims please correct me if I'm wrong).  I don't think we should be exposing that format through the clang driver.

What is the use case that you're trying to solve?  Would it be possible to add a `spirv-as` invocation before passing textual SPIR-V back to llvm-spirv?  Alternatively, perhaps we should teach llvm-spirv to be able to consume the conventional SPIRV-Tools textual format.  That would be a natural counterpart to llvm-spirv's `--spirv-tools-dis` option.

> Once we are using the SPIR-V backend we should be able to get rid of this.

With the current patch, I expect you'd still have the problem that llvm-spirv cannot consume the output produced by the SPIR-V backend?

https://github.com/llvm/llvm-project/pull/120266


More information about the cfe-commits mailing list