Mesa (main): gallivm: fix pass init order on mips64 with llvm 8

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jul 21 13:35:54 UTC 2021


Module: Mesa
Branch: main
Commit: 7c81a9d56f7f308c494cbe971f00eaaf786834af
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7c81a9d56f7f308c494cbe971f00eaaf786834af

Author: suijingfeng <suijingfeng at loongson.cn>
Date:   Mon Jul 19 21:24:35 2021 +0800

gallivm: fix pass init order on mips64 with llvm 8

llvm 8 has some missing pass dependencies, fix the mips64 case
as well.

See similiar fix:

[1] https://gitlab.freedesktop.org/mesa/mesa/-/commit/f59ff014b199af118ac9b90e3a67f15f4c37110e
[2] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3805

Reviewed-by: Adam Jackson <ajax at redhat.com>
Signed-off-by: suijingfeng <suijingfeng at loongson.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11955>

---

 src/gallium/auxiliary/gallivm/lp_bld_init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
index dd428242cb9..8e5fe6f24dc 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
@@ -46,7 +46,7 @@
 #endif
 #include <llvm-c/BitWriter.h>
 #if GALLIVM_HAVE_CORO
-#if LLVM_VERSION_MAJOR <= 8 && (defined(PIPE_ARCH_AARCH64) || defined (PIPE_ARCH_ARM) || defined(PIPE_ARCH_S390))
+#if LLVM_VERSION_MAJOR <= 8 && (defined(PIPE_ARCH_AARCH64) || defined (PIPE_ARCH_ARM) || defined(PIPE_ARCH_S390) || defined(PIPE_ARCH_MIPS64))
 #include <llvm-c/Transforms/IPO.h>
 #endif
 #include <llvm-c/Transforms/Coroutines.h>
@@ -137,7 +137,7 @@ create_pass_manager(struct gallivm_state *gallivm)
    }
 
 #if GALLIVM_HAVE_CORO
-#if LLVM_VERSION_MAJOR <= 8 && (defined(PIPE_ARCH_AARCH64) || defined (PIPE_ARCH_ARM) || defined(PIPE_ARCH_S390))
+#if LLVM_VERSION_MAJOR <= 8 && (defined(PIPE_ARCH_AARCH64) || defined (PIPE_ARCH_ARM) || defined(PIPE_ARCH_S390) || defined(PIPE_ARCH_MIPS64))
    LLVMAddArgumentPromotionPass(gallivm->cgpassmgr);
    LLVMAddFunctionAttrsPass(gallivm->cgpassmgr);
 #endif



More information about the mesa-commit mailing list