Mesa (master): gallivm: fix build on LLVM 12 due to LLVMAddConstantPropagationPass removal

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Sep 1 07:12:25 UTC 2020


Module: Mesa
Branch: master
Commit: 52cac068621a5998f486f8e44f9c2d9d045d1c31
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=52cac068621a5998f486f8e44f9c2d9d045d1c31

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Mon Aug 31 21:59:39 2020 -0400

gallivm: fix build on LLVM 12 due to LLVMAddConstantPropagationPass removal

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3465
Cc: 20.1 20.2 <mesa-stable at lists.freedesktop.org>
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6531>

---

 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);
    }



More information about the mesa-commit mailing list