From: Marek Olšák Date: Tue, 1 Sep 2020 01:59:39 +0000 (-0400) Subject: gallivm: fix build on LLVM 12 due to LLVMAddConstantPropagationPass removal X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=52cac068621a5998f486f8e44f9c2d9d045d1c31;p=mesa.git 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: --- 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); }