lp_bld_init.c:172:7: error: implicit declaration of function ‘LLVMAddConstantPropagationPass’; did you mean ‘LLVMAddCorrelatedValuePropagationPass’? [-Werror=implicit-function-declaration]
This is a build error with llvm-12.
Compiling src/gallium/auxiliary/gallivm/lp_bld_init.c ...
src/gallium/auxiliary/gallivm/lp_bld_init.c: In function ‘create_pass_manager’:
src/gallium/auxiliary/gallivm/lp_bld_init.c:172:7: error: implicit declaration of function ‘LLVMAddConstantPropagationPass’; did you mean ‘LLVMAddCorrelatedValuePropagationPass’? [-Werror=implicit-function-declaration]
172 | LLVMAddConstantPropagationPass(gallivm->passmgr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| LLVMAddCorrelatedValuePropagationPass
Build error was introduced with this llvm-12 commit.
commit 486ed885339d70cd71ee55567282a43cce28d763
Author: Arthur Eubanks <aeubanks@google.com>
Date: Mon Aug 3 13:46:11 2020 -0700
[ConstProp] Remove ConstantPropagation
As discussed in
http://lists.llvm.org/pipermail/llvm-dev/2020-July/143801.html.
Currently no users outside of unit tests.
Replace all instances in tests of -constprop with -instsimplify.
Notable changes in tests:
* vscale.ll - @llvm.sadd.sat.nxv16i8 is evaluated by instsimplify, use a fake intrinsic instead
* InsertElement.ll - insertelement undef is removed by instsimplify in @insertelement_undef
llvm/test/Transforms/ConstProp moved to llvm/test/Transforms/InstSimplify/ConstProp
Reviewed By: lattner, nikic
Differential Revision: https://reviews.llvm.org/D85159
cc: @sroland