KhronosGroup / SPIRV-LLVM-Translator

A tool and a library for bi-directional translation between SPIR-V and LLVM IR

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Translator incapable to generate TypeStruct EntryPoint parameters

MrSidims opened this issue · comments

clang following spir calling convention will generate byval pointer on a kernel if a structure is passed as kernel argument, see https://godbolt.org/z/c994q86xr .

Translator generates SPIR-V following input LLVM IR 1:1 and also generates byval pointer. Meanwhile in SPIR-V it's not disallowed to use directly TypeStruct EntryPoint parameter, and in some cases it's a missing optimization opportunity.

Need to investigate if we can promote byval pointer and if it breaks anything end-2-end