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

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Aug 22 12:05:10 UTC 2020


Module: Mesa
Branch: staging/20.1
Commit: 83e91e6847df693362d022c145fbe2341fa955e6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=83e91e6847df693362d022c145fbe2341fa955e6

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>
(cherry picked from commit e3e45e2456d2dc7eccf03d7c93bc9cee823a1eec)

---

 .pick_status.json                                     | 2 +-
 src/gallium/state_trackers/clover/llvm/invocation.cpp | 5 -----
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 78a7b163ed5..fba21a78e88 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -13,7 +13,7 @@
         "description": "clover/spirv: Don't call llvm::regularizeLlvmForSpirv",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "2043c5f37cf1f1b64a8f5d9ae04bbf8e7860f616"
     },
diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp
index 95a9d036622..bedba9fa5b7 100644
--- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
+++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
@@ -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";



More information about the mesa-commit mailing list