Closed vladimirtelepov closed 2 years ago
You can patch the source by replacing createConstantPropagationPass with createInstSimplifyPass
This is an LLVM API change, I thought it was in 13, not 12 though.
You can patch the source by replacing createConstantPropagationPass with createInstSimplifyPass
This is an LLVM API change, I thought it was in 13, not 12 though.
got this error
Optimize.cpp:913:17: error: no member named 'createInstSimplifyPass' in namespace 'llvm'
fpm.add(llvm::createInstSimplifyPass());
~~~~~~^
1 error generated.
make[2]: *** [anvill/CMakeFiles/anvill.dir/build.make:314: anvill/CMakeFiles/anvill.dir/src/Optimize.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:405: anvill/CMakeFiles/anvill.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
@michaelbrownuc any updates on issue? I tried build latest version(82c310697f1019bafee72265c490ac4aa959e2aa) but error still occur. File compiles after removing optimization. But other error occurs. After removing quotes and next try other error occur.
IIRC there are a few API changes to make, including the one in the second screenshot. In that case removing the -1
parameter should solve that compiler error.
@michaelbrownuc now have this error
@invlpg seg_type is used and returned later in function GetSegmentType so just removing code doesnt work.
simply removed that optimization and it compiles.
// fpm.add(llvm::createInstSimplifyPass());
Also "getTypeByName" is not in "llvm::Module" it seems? https://reviews.llvm.org/D78793
had to remove this code to get it compiling on llvm 12.
auto seg_type = gModule->getTypeByName(type_name); if (seg_type) { return seg_type; }
getTypeByName is moved to other place. Try this, it work for me
auto seg_type = llvm::StructType::getTypeByName(gModule->getContext(), type_name);
Thanks, it works.
OS: Ubuntu20.04 CC=Clang-12 CXX=Clang++-12
this commands works fine:
but
fails with error message