Mesa (staging/20.1): gallivm: fix build on LLVM 12 due to LLVMAddConstantPropagationPass removal
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Sep 1 18:41:21 UTC 2020
Module: Mesa
Branch: staging/20.1
Commit: df56c0e3d7edc26007a9047a5e030a487eed9c3c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=df56c0e3d7edc26007a9047a5e030a487eed9c3c
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>
(cherry picked from commit 52cac068621a5998f486f8e44f9c2d9d045d1c31)
---
.pick_status.json | 2 +-
src/gallium/auxiliary/gallivm/lp_bld_init.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/.pick_status.json b/.pick_status.json
index 89b0e56764b..fbb0aabbeeb 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -364,7 +364,7 @@
"description": "gallivm: fix build on LLVM 12 due to LLVMAddConstantPropagationPass removal",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": null
},
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
index e3fd26cd2ec..077b65da9cb 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