clover: Call clang with -O0 for the SPIR-V path
authorJason Ekstrand <jason@jlekstrand.net>
Fri, 14 Aug 2020 20:48:59 +0000 (15:48 -0500)
committerMarge Bot <eric+marge@anholt.net>
Sat, 22 Aug 2020 00:27:07 +0000 (00:27 +0000)
commit32dc71b23acc996198ecf429018a12326689ae01
tree86a9e035c28c76976772765b00d78b4766ba22a9
parente3e45e2456d2dc7eccf03d7c93bc9cee823a1eec
clover: Call clang with -O0 for the SPIR-V path

SPIRV-LLVM-Translator isn't really built for handling optimized LLVM IR.
It tends to fall over when, for instance, an optimization generates an
i96 type which isn't legal in SPIR-V.  Pass -O0 to avoid these cases.
See https://github.com/KhronosGroup/SPIRV-LLVM-Translator/issues/203.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6432>
src/gallium/frontends/clover/llvm/invocation.cpp