diff options
author | Marek Olšák <marek.olsak@amd.com> | 2020-08-31 21:59:39 -0400 |
---|---|---|
committer | Dylan Baker <dylan.c.baker@intel.com> | 2020-09-01 13:53:36 -0700 |
commit | 1629fe89a659a5af95cdc5e473e1eceb6413d1e1 (patch) | |
tree | a349fbbd12edabd54902c0bca1cd41c07904bcc0 | |
parent | 7a63155052a9362964224039639af0ec88e8def4 (diff) |
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@lists.freedesktop.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6531>
(cherry picked from commit 52cac068621a5998f486f8e44f9c2d9d045d1c31)
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_init.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/.pick_status.json b/.pick_status.json index 92da6a19b61..b45eb139cdf 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -490,7 +490,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 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); } |