Hi,
I've tried building this against llvm-6.0, but it fails pretty quickly with `error: no matching function for call to ‘llvm::PostDominatorTree::PostDominatorTree(llvm::Function&)`
The full output is below. I'd appreciate any hints you could give on getting this to go, as trying to get anything to build against llvm always seems to end up being a rather "interesting" exercise.
Thanks. This certainly looks like a very nice project.
Regards,
Adam Antonik
$ cmake .. -DLLVM_DIR=/usr/lib/llvm-6.0/lib/cmake/llvm
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
LLVM_SHLIBEXT=.so
found llvm dir /usr/lib/llvm-6.0/lib/cmake/llvm
found llvm lit /home/adam/v2/Enzyme/enzyme/build
CMAKE_PREFIX_PATH /usr/lib/llvm-6.0/lib/cmake/llvm
-- Linker detection: GNU ld
LLVM_INSTALL_PREFIX: /usr/lib/llvm-6.0
LLVM_INCLUDE_DIRS: /usr/lib/llvm-6.0/include
found llvm definitions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
found llvm version 6
first llvm include directory/usr/lib/llvm-6.0/include
found enzyme sources ActivityAnalysis.cppCacheUtility.cppEnzyme.cppEnzymeLogic.cppFunctionUtils.cppGradientUtils.cppMustExitScalarEvolution.cppUtils.cppSCEV/ScalarEvolutionExpander.cppTypeAnalysis/TypeTree.cppTypeAnalysis/TypeAnalysis.cppTypeAnalysis/TypeAnalysisPrinter.cpp
found bench flags: -I/home/adam/v2/Enzyme/enzyme/build/benchmarks/adept2/src/adept2/include -I/home/adam/v2/Enzyme/enzyme/build/benchmarks/tapenade/src/tapenade
-- Configuring done
-- Generating done
-- Build files have been written to: /home/adam/v2/Enzyme/enzyme/build
$ make
Scanning dependencies of target intrinsics_gen
[ 0%] Built target intrinsics_gen
Scanning dependencies of target LLVMEnzyme-6
[ 7%] Building CXX object Enzyme/CMakeFiles/LLVMEnzyme-6.dir/ActivityAnalysis.cpp.o
[ 15%] Building CXX object Enzyme/CMakeFiles/LLVMEnzyme-6.dir/CacheUtility.cpp.o
[ 23%] Building CXX object Enzyme/CMakeFiles/LLVMEnzyme-6.dir/Enzyme.cpp.o
In file included from /home/adam/v2/Enzyme/enzyme/Enzyme/Enzyme.cpp:51:0:
/home/adam/v2/Enzyme/enzyme/Enzyme/GradientUtils.h: In constructor ‘GradientUtils::GradientUtils(llvm::Function*, llvm::Function*, llvm::TargetLibraryInfo&, TypeAnalysis&, llvm::AAResults&, llvm::ValueToValueMapTy&, const llvm::SmallPtrSetImpl<llvm::Value*>&, const llvm::SmallPtrSetImpl<llvm::Value*>&, bool, llvm::ValueToValueMapTy&, DerivativeMode)’:
/home/adam/v2/Enzyme/enzyme/Enzyme/GradientUtils.h:438:24: error: no matching function for call to ‘llvm::PostDominatorTree::PostDominatorTree(llvm::Function&)’
AA(AA_), TA(TA_) {
^
In file included from /home/adam/v2/Enzyme/enzyme/Enzyme/GradientUtils.h:55:0,
from /home/adam/v2/Enzyme/enzyme/Enzyme/Enzyme.cpp:51:
/usr/lib/llvm-6.0/include/llvm/Analysis/PostDominators.h:29:8: note: candidate: llvm::PostDominatorTree::PostDominatorTree()
struct PostDominatorTree : public PostDomTreeBase<BasicBlock> {
^~~~~~~~~~~~~~~~~
/usr/lib/llvm-6.0/include/llvm/Analysis/PostDominators.h:29:8: note: candidate expects 0 arguments, 1 provided
/usr/lib/llvm-6.0/include/llvm/Analysis/PostDominators.h:29:8: note: candidate: llvm::PostDominatorTree::PostDominatorTree(llvm::PostDominatorTree&&)
/usr/lib/llvm-6.0/include/llvm/Analysis/PostDominators.h:29:8: note: no known conversion for argument 1 from ‘llvm::Function’ to ‘llvm::PostDominatorTree&&’
Enzyme/CMakeFiles/LLVMEnzyme-6.dir/build.make:107: recipe for target 'Enzyme/CMakeFiles/LLVMEnzyme-6.dir/Enzyme.cpp.o' failed
make[2]: *** [Enzyme/CMakeFiles/LLVMEnzyme-6.dir/Enzyme.cpp.o] Error 1
CMakeFiles/Makefile2:515: recipe for target 'Enzyme/CMakeFiles/LLVMEnzyme-6.dir/all' failed
make[1]: *** [Enzyme/CMakeFiles/LLVMEnzyme-6.dir/all] Error 2
Makefile:148: recipe for target 'all' failed
make: *** [all] Error 2