clover/spirv: Don't call llvm::regularizeLlvmForSpirv
authorJason Ekstrand <jason@jlekstrand.net>
Thu, 13 Aug 2020 20:12:15 +0000 (15:12 -0500)
committerMarge Bot <eric+marge@anholt.net>
Fri, 21 Aug 2020 23:18:08 +0000 (23:18 +0000)
writeSpirv() already takes care of that, and calling it twice seems to
duplicate functions and cause problems when processing execution modes.

Fixes: 2043c5f37cf "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>

src/gallium/frontends/clover/llvm/invocation.cpp

index f7c0313be4dc7b688b3fa08de6cbc5dca4ab8e68..38070a94e027a7dce13a3e5673c22d1e5a1b69ad 100644 (file)
@@ -460,11 +460,6 @@ clover::llvm::compile_to_spirv(const std::string &source,
    const auto spirv_options = get_spirv_translator_options(dev);
 
    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(), spirv_options, os, error_msg)) {
       r_log += "Translation from LLVM IR to SPIR-V failed: " + error_msg + ".\n";