gallivm/s390: fix pass init order on s390 with llvm 8 (v2)
authorDave Airlie <airlied@redhat.com>
Thu, 13 Feb 2020 00:35:51 +0000 (10:35 +1000)
committerMarge Bot <eric+marge@anholt.net>
Sat, 15 Feb 2020 04:15:00 +0000 (04:15 +0000)
llvm 8 has some missing pass dependencies, fix the s390 case
as well.

v2: add ARM also (Michel)

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3805>

src/gallium/auxiliary/gallivm/lp_bld_init.c

index 6206d79cc54c7bbe8db62af66d0a20356e085416..4047f2bd781f4b04ad3e1157f473da5ff6088041 100644 (file)
@@ -46,7 +46,7 @@
 #endif
 #include <llvm-c/BitWriter.h>
 #if GALLIVM_HAVE_CORO
-#if LLVM_VERSION_MAJOR <= 8 && defined(PIPE_ARCH_AARCH64)
+#if LLVM_VERSION_MAJOR <= 8 && (defined(PIPE_ARCH_AARCH64) || defined (PIPE_ARCH_ARM) || defined(PIPE_ARCH_S390))
 #include <llvm-c/Transforms/IPO.h>
 #endif
 #include <llvm-c/Transforms/Coroutines.h>
@@ -137,7 +137,8 @@ create_pass_manager(struct gallivm_state *gallivm)
    }
 
 #if GALLIVM_HAVE_CORO
-#if LLVM_VERSION_MAJOR <= 8 && defined(PIPE_ARCH_AARCH64)
+#if LLVM_VERSION_MAJOR <= 8 && (defined(PIPE_ARCH_AARCH64) || defined (PIPE_ARCH_ARM) || defined(PIPE_ARCH_S390))
+   LLVMAddArgumentPromotionPass(gallivm->cgpassmgr);
    LLVMAddFunctionAttrsPass(gallivm->cgpassmgr);
 #endif
    LLVMAddCoroEarlyPass(gallivm->cgpassmgr);