cdl-saarland / rv

RV: A Unified Region Vectorizer for LLVM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Check for compiler-rt sources when RV_ENABLE_CRT=on

simoll opened this issue · comments

RV's cmake files should verify that compiler-rt source files are present in llvm/projects/compiler-rt when the cmake build is configured with the option -DRV_ENABLE_CRT=on.

Otw, the build will crash in an attempt to compile non-existent source files of compiler-rt into BC.

@simoll - the case in which I ran into the error was using the LLVM mono-repo. Could you try that configuration? Maybe RV needs to be updated to understand the monorepo paths? Because with the monorepo, compiler-rt is not in llvm-project/llvm/projects but rather in llvm-project/compiler/rt.

Or maybe I just need to be passing -DLLVM_ENABLE_PROJECTS=clang to the LLVM cmake?

Could you check whether 23d013c fixes the issues for LLVM monorepo? RV will look for compiler-rt sources at these locations:

  1. llvm/runtimes/compiler-rt
  2. llvm/projects/compiler-rt
  3. llvm/../compiler-rt <-- the mono repo case

I'm still getting errors, but they are different:

In file included from /home/mppf/w/llvm2/third-party/llvm/llvm-project/llvm/tools/rv/src/analysis/AllocaSSA.cpp:1:
/home/mppf/w/llvm2/third-party/llvm/llvm-project/llvm/tools/rv/include/rv/analysis/AllocaSSA.h:183:54: error: ‘getProvenance’ function uses ‘auto’ type specifier without trailing return type
   const auto & getProvenance(const llvm::Value& val) const {
                                                      ^~~~~
/home/mppf/w/llvm2/third-party/llvm/llvm-project/llvm/tools/rv/include/rv/analysis/AllocaSSA.h:183:54: note: deduced return type only available with -std=c++14 or -std=gnu++14
[ 96%] Building CXX object tools/rv/src/CMakeFiles/RV.dir/analysis/predicateAnalysis.cpp.o
In file included from /home/mppf/w/llvm2/third-party/llvm/llvm-project/llvm/tools/rv/include/rv/analysis/VectorizationAnalysis.h:14,
                 from /home/mppf/w/llvm2/third-party/llvm/llvm-project/llvm/tools/rv/src/analysis/VectorizationAnalysis.cpp:11:
/home/mppf/w/llvm2/third-party/llvm/llvm-project/llvm/tools/rv/include/rv/analysis/AllocaSSA.h:183:54: error: ‘getProvenance’ function uses ‘auto’ type specifier without trailing return type
   const auto & getProvenance(const llvm::Value& val) const {
                                                      ^~~~~
/home/mppf/w/llvm2/third-party/llvm/llvm-project/llvm/tools/rv/include/rv/analysis/AllocaSSA.h:183:54: note: deduced return type only available with -std=c++14 or -std=gnu++14
make[7]: *** [tools/rv/src/CMakeFiles/RV.dir/build.make:258: tools/rv/src/CMakeFiles/RV.dir/analysis/AllocaSSA.cpp.o] Error 1
make[7]: *** Waiting for unfinished jobs....
In file included from /home/mppf/w/llvm2/third-party/llvm/llvm-project/llvm/tools/rv/include/rv/analysis/VectorizationAnalysis.h:14,
                 from /home/mppf/w/llvm2/third-party/llvm/llvm-project/llvm/tools/rv/src/rv.cpp:22:
/home/mppf/w/llvm2/third-party/llvm/llvm-project/llvm/tools/rv/include/rv/analysis/AllocaSSA.h:183:54: error: ‘getProvenance’ function uses ‘auto’ type specifier without trailing return type
   const auto & getProvenance(const llvm::Value& val) const {
                                                      ^~~~~
/home/mppf/w/llvm2/third-party/llvm/llvm-project/llvm/tools/rv/include/rv/analysis/AllocaSSA.h:183:54: note: deduced return type only available with -std=c++14 or -std=gnu++14

RV requires C++ 14. Try building with -DLLVM_CXX_STD:STRING=c++14.

db86b14 aborts cmake with a helpful message when trying to compile RV with c++11.

@simoll - thanks, that resolved the build issues for me.