Mesa (master): gallivm: add InstSimplify pass

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Sep 4 19:14:02 UTC 2020


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

Author: Roland Scheidegger <sroland at vmware.com>
Date:   Wed Sep  2 04:04:50 2020 +0200

gallivm: add InstSimplify pass

This is the recommended replacement for the removed ConstantPropagation
pass, and llvm now added c binding for it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6585>

---

 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 1eb4892a4a6..fe3ef4a48df 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
@@ -171,6 +171,8 @@ create_pass_manager(struct gallivm_state *gallivm)
       LLVMAddPromoteMemoryToRegisterPass(gallivm->passmgr);
 #if LLVM_VERSION_MAJOR <= 11
       LLVMAddConstantPropagationPass(gallivm->passmgr);
+#else
+      LLVMAddInstructionSimplifyPass(gallivm->passmgr);
 #endif
       LLVMAddInstructionCombiningPass(gallivm->passmgr);
       LLVMAddGVNPass(gallivm->passmgr);



More information about the mesa-commit mailing list