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>
This commit is contained in:
Roland Scheidegger 2020-09-02 04:04:50 +02:00 committed by Roland Scheidegger
parent 64b0b7c274
commit 1d018bc7fd
1 changed files with 2 additions and 0 deletions

View File

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