From 52cac068621a5998f486f8e44f9c2d9d045d1c31 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Mon, 31 Aug 2020 21:59:39 -0400 Subject: [PATCH] gallivm: fix build on LLVM 12 due to LLVMAddConstantPropagationPass removal Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3465 Cc: 20.1 20.2 Reviewed-by: Dave Airlie Part-of: --- src/gallium/auxiliary/gallivm/lp_bld_init.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c index 6ebc9ebf25a..1eb4892a4a6 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c @@ -169,7 +169,9 @@ create_pass_manager(struct gallivm_state *gallivm) */ LLVMAddReassociatePass(gallivm->passmgr); LLVMAddPromoteMemoryToRegisterPass(gallivm->passmgr); +#if LLVM_VERSION_MAJOR <= 11 LLVMAddConstantPropagationPass(gallivm->passmgr); +#endif LLVMAddInstructionCombiningPass(gallivm->passmgr); LLVMAddGVNPass(gallivm->passmgr); } -- 2.30.2