clover/spirv: Don't call llvm::regularizeLlvmForSpirv

writeSpirv() already takes care of that, and calling it twice seems to
duplicate functions and cause problems when processing execution modes.

Fixes: 2043c5f37c "clover/llvm: Add functions for compiling from..."
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6306>
(cherry picked from commit e3e45e2456)
This commit is contained in:
Jason Ekstrand 2020-08-13 15:12:15 -05:00 committed by Dylan Baker
parent dee7acec82
commit 786e6a2af8
2 changed files with 1 additions and 6 deletions

View file

@ -1921,7 +1921,7 @@
"description": "clover/spirv: Don't call llvm::regularizeLlvmForSpirv",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "2043c5f37cf1f1b64a8f5d9ae04bbf8e7860f616"
},

View file

@ -439,11 +439,6 @@ clover::llvm::compile_to_spirv(const std::string &source,
debug::log(".ll", print_module_bitcode(*mod));
std::string error_msg;
if (!::llvm::regularizeLlvmForSpirv(mod.get(), error_msg)) {
r_log += "Failed to regularize LLVM IR for SPIR-V: " + error_msg + ".\n";
throw error(CL_INVALID_VALUE);
}
std::ostringstream os;
if (!::llvm::writeSpirv(mod.get(), os, error_msg)) {
r_log += "Translation from LLVM IR to SPIR-V failed: " + error_msg + ".\n";