Mesa (master): clover/spirv: Don't call llvm::regularizeLlvmForSpirv

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Aug 21 23:25:34 UTC 2020


Module: Mesa
Branch: master
Commit: e3e45e2456d2dc7eccf03d7c93bc9cee823a1eec
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e3e45e2456d2dc7eccf03d7c93bc9cee823a1eec

Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Thu Aug 13 15:12:15 2020 -0500

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: 2043c5f37cf "clover/llvm: Add functions for compiling from..."
Acked-by: Daniel Stone <daniels at collabora.com>
Reviewed-by: Pierre Moreau <dev at pmoreau.org>
Reviewed-by: Boris Brezillon <boris.brezillon at collabora.com>
Reviewed-by: Karol Herbst <kherbst at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6306>

---

 src/gallium/frontends/clover/llvm/invocation.cpp | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/src/gallium/frontends/clover/llvm/invocation.cpp b/src/gallium/frontends/clover/llvm/invocation.cpp
index f7c0313be4d..38070a94e02 100644
--- a/src/gallium/frontends/clover/llvm/invocation.cpp
+++ b/src/gallium/frontends/clover/llvm/invocation.cpp
@@ -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";



More information about the mesa-commit mailing list